- Synodic Tithi depends on (Moon - Sun) where Ayanamsa cancels out, whereas Nakshatra and Nitya Yoga require exact Nirayana sidereal subtraction.
- Finding the exact minute a Tithi ends is a root-finding problem solved cleanly in 3–4 Secant or Newton-Raphson iterations over ephemeris longitudes.
- Lunar orbital eccentricity causes Tithi durations to swing between ~19.4 hours and ~26.8 hours, producing Kshaya and Adhika Tithis.
1. Tropical (Sayana) vs Sidereal (Nirayana) Ecliptic Coordinates
Modern planetary ephemerides such as NASA JPL DE440 or VSOP87 compute celestial longitudes in the Tropical (Sayana) reference frame, where `0°` Aries is defined by the vernal equinox—the intersection of Earth’s equator and ecliptic plane. Because Earth’s rotational axis precesses like a spinning gyroscope over a ~25,772-year cycle (Luni-Solar Precession, ~50.29 arcseconds per year), the Tropical equinox drifts backward against the background constellations.
Classical Indian Panchang calculations anchor zodiac Rasis and all 27 Nakshatras to fixed sidereal stars (Nirayana). Subtracting the accumulated precession angle—known as Ayanamsa—from Tropical longitude yields Nirayana longitude:
/**
* Computes Lahiri (Chitrapaksha) Ayanamsa in degrees for a given Julian Ephemeris Day (JDE).
* Reference epoch J2000.0 (JDE 2451545.0 => 2000-01-01 12:00 TT): ~23.853056 deg.
*/
export function computeLahiriAyanamsaDeg(jde: number): number {
const T = (jde - 2451545.0) / 36525.0; // Julian centuries from J2000.0
const baseArcSec = 85871.0; // 23° 51' 11" at J2000
const precessionArcSec = 5028.796195 * T + 1.1054348 * T * T;
return (baseArcSec + precessionArcSec) / 3600.0;
}
export function toNirayanaLongitude(tropicalDeg: number, jde: number): number {
const raw = (tropicalDeg - computeLahiriAyanamsaDeg(jde)) % 360;
return raw < 0 ? raw + 360 : raw;
}2. Why Tithi Cancels Ayanamsa While Nakshatra & Yoga Depend on It
A fascinating mathematical property surprises many developers implementing their first Panchang engine: Tithi and Karana are 100% invariant to Ayanamsa choice! Why? Because Tithi measures synodic angular separation between Moon and Sun: `(λ_Moon_Nirayana - λ_Sun_Nirayana) = (λ_Moon_Tropical - A) - (λ_Sun_Tropical - A) = λ_Moon_Tropical - λ_Sun_Tropical`. The Ayanamsa `A` cancels out algebraically!
By contrast, Lunar Nakshatra (`floor(λ_Moon_Nirayana / 13.3333°)`), Solar Sankranti (Rasi ingress), and Nitya Yoga (`floor((λ_Moon_Nirayana + λ_Sun_Nirayana) / 13.3333°)`—where `-2A` adds up!) shift directly if an incorrect Ayanamsa formula is used.
| Limb (Anga) | Angular Span | Governing Formula (Degrees) | Ayanamsa Dependent? |
|---|---|---|---|
| 1. Vaara (Weekday) | Sunrise to Sunrise | Savana solar civil day (0..6) | No (Local Sunrise) |
| 2. Tithi (Lunar Day) | 12° synodic | floor(((λ_Moon - λ_Sun) mod 360) / 12) + 1 | No (Cancels out) |
| 3. Nakshatra (Mansion) | 13° 20′ (13.333°) | floor(λ_Moon_Nirayana / (360 / 27)) + 1 | Yes (-1 × Ayanamsa) |
| 4. Nitya Yoga | 13° 20′ (13.333°) | floor(((λ_Moon_Nir + λ_Sun_Nir) mod 360) / 13.333) + 1 | Yes (-2 × Ayanamsa) |
| 5. Karana (Half-Tithi) | 6° synodic | floor(((λ_Moon - λ_Sun) mod 360) / 6) + 1 | No (Cancels out) |
3. Solving Exact Tithi End Timestamps with Secant / Newton-Raphson Iteration
Because the Moon travels along an elliptical orbit perturbed by solar gravity (Evection, Variation, and Annual Inequality), its angular speed relative to the Sun varies between ~11.0°/day and ~14.5°/day. You cannot divide remaining degrees by a constant `12.19°/day` if you want minute-accurate Tithi ending times (`Samapti Kaal`).
Instead, finding the exact Julian instant `t*` when `(λ_Moon(t) - λ_Sun(t)) mod 360` crosses target boundary `12° × k` is a smooth monotonic root-finding problem. Starting from linear velocity estimate `t_0`, three Newton-Raphson or Secant steps converge within `< 0.2 seconds` of time precision!
export function solveTithiBoundaryJd(
startJd: number,
targetElongationDeg: number, // e.g., 120.0 for Dashami -> Ekadashi
elongationAtJd: (jd: number) => number,
): number {
let jd = startJd;
for (let iter = 0; iter < 5; iter++) {
const current = elongationAtJd(jd);
// Shortest signed angular distance in (-180, +180]
const errDeg = ((current - targetElongationDeg + 540) % 360) - 180;
if (Math.abs(errDeg) < 1e-5) break;
// Finite-difference synodic speed (deg/day), ~12.19 deg/day average
const dt = 0.01;
const next = elongationAtJd(jd + dt);
const speedDegPerDay = (((next - current + 540) % 360) - 180) / dt;
jd -= errDeg / speedDegPerDay;
}
return jd;
}4. Understanding Kshaya Tithi (Skipped) and Adhika Tithi (Repeated)
Near lunar perigee, a 12° Tithi can complete in ~19.5 hours. If Dashami ends 25 minutes after Monday’s 06:30 AM sunrise (at 06:55 AM), Ekadashi runs for 19.8 hours and ends at 02:43 AM before Tuesday’s 06:31 AM sunrise—so Monday sunrise has Dashami and Tuesday sunrise has Dwadashi! That phenomenon is a Kshaya Tithi, governed by specialized Smarta and Vaishnava Ekadashi Viddha rules.
Conversely, near lunar apogee, a Tithi stretching to 26.5 hours can span two consecutive sunrises (starting 05:50 AM Monday before 06:10 AM sunrise and ending 08:20 AM Tuesday after 06:11 AM sunrise), producing an Adhika / Vriddhi Tithi.
- Always compute wrapping differences modulo 360° using `((a - b + 540) % 360) - 180` so `359.8° -> 0.2°` Amavasya-to-Pratipada transitions never diverge.
- Account for ΔT (`TT - UTC ≈ 69.2 seconds` in 2026) when converting Ephemeris Time into IST civil timestamps.
- Experiment interactively with longitudes right now in our Lunar Tithi & Nakshatra Explorer at /tools/tithi-nakshatra-lunar-phase-calculator.
Frequently Asked Questions
How much error does ignoring ΔT (Terrestrial Time minus UTC) introduce?
In 2026, ΔT is roughly 69 seconds, so ignoring ΔT shifts lunar Tithi transition timestamps by just over 1 minute—small for casual checks, but decisive when a Tithi ends within 60 seconds of local sunrise!
Why are there 27 Nakshatras of 13°20′ instead of 12 signs of 30°?
The Moon completes one sidereal orbit relative to fixed stars in ~27.32166 days, so ancient Vedic astronomers divided the ecliptic into 27 daily lunar mansions (13°20′ each), with 4 Padas × 27 = 108 total Padas matching the 12 Rasis × 9 Navamshas.
What is Vishti Karana (Bhadra)?
Among the 7 repeating movable Karanas (each spanning 6° of synodic elongation, or half a Tithi), the 7th movable Karana is Vishti—popularly known as Bhadra—traditionally checked before starting certain ceremonies.