How our calculations are made
Every number on joshiastro comes from code, not from a table typed in by hand. This page lists the formulas, so you can check them.
1. Planet positions
Sun and Moon positions come from astronomy-engine v2.1.19 (MIT licence), an ephemeris library. We use its geocentric ecliptic longitude of date. Sunrise and sunset are found with its rise-and-set search for your city's latitude and longitude.
2. Ayanamsa (sidereal correction)
Sidereal longitude = tropical longitude − ayanamsa. The ayanamsa is a linear function of time from J2000:
ayanamsa(t) = A₀ + 5027.8″ × T, where T is Julian centuries from J2000 (2000-01-01 12:00 TT).
| Ayanamsa | A₀ at J2000 |
|---|---|
| Lahiri (Chitrapaksha) — default | 23.8571° |
| Raman | 22.4108° |
| Krishnamurti (KP) | 23.7602° |
Values from the Swiss Ephemeris mode table as listed in the kerykeion documentation. We will cross-check them against the Swiss Ephemeris source before relying on them for ranking pages.
3. Panchang elements
Tithi: the Moon's elongation from the Sun, divided into 12° steps. 1–15 are Shukla paksha, 16–30 are Krishna paksha.
Karana: the elongation divided into 6° steps (60 per month). The first is Kimstughna, the last three are Shakuni, Chatushpada and Naga, and the 56 between repeat the seven movable karanas.
Nakshatra: the sidereal Moon divided into 27 parts of 13°20′.
Yoga: the sidereal Sun plus the sidereal Moon, modulo 360°, divided into 27 parts of 13°20′.
Rashi (Moon sign): the sidereal Moon divided into 12 parts of 30°.
Vara: the weekday of the civil date at your local offset.
4. Reference time
Panchang values are taken at sunrise. The "ends at" times are the first moment after sunrise, within 36 hours, when the value changes, found by a 30-minute scan refined by bisection to one minute.
5. Verification status
The formulas and code are in place. Comparison with published panchangs for a set of dates is still to be done; this page will be updated with the dates and results when it is.