Skip to content
Documentation · all sections

Accuracy

panchang · v5.4.0 · MIT

What the test suite verifies against the reference almanac, end-time drift bounds, ayanamsa provenance, and documented festival-dating tradeoffs.

The library ships 9,207 tests across 146 files. The fixtures are checked against reference-almanac calculations for 2025–2026, covering 10 Indian cities plus New York, London, Sydney, Dubai and Singapore. The overseas fixtures include a DST changeover on America/New_York.

Festival days are pinned separately. 155 dated captures from 2002 to 2040, 119 from the reference almanac and 36 from other published calendars, cover New Delhi, Pune, Kolkata and Hyderabad, alongside seven whole-year lists (Pradosh, the Shivaratris and the Chaturthis at New Delhi and Pune). The nakshatra and solar-month festivals have year lists and dated checks of their own at New Delhi, Kochi, Chennai and Kolkata, and the Odia new year has ten dates for Bhubaneswar.

What is verified, and to what tolerance

ElementAccuracy
Sunrise / SunsetWithin 29 s of the reference minute-midpoint. The tests allow ±45 s
Moonrise / MoonsetMeeus apparent-upper-limb, with refraction and parallax. Expect a 3–5 min difference from sources that use a simpler horizon
Tithi / Nakshatra / Yoga / Karana namesExact match against the reference
Tithi / Nakshatra / Yoga / Karana end-timesWithin 63 s of the reference almanac across all 20 audited comparisons: tithi 48 s, karana 55 s, nakshatra 27 s, yoga 63 s. Of that, ±30 s is the almanac rounding to the minute
Ayanamsa (Lahiri)Matches the value the reference almanac publishes to about 0.01″, from 1950 to 2050
Planetary positions (Sun–Saturn)±0.02° sidereal
Planetary positions (Rahu/Ketu, mean node)Usually within 0.5°. The tolerance is ±2°
Planetary positions (Rahu/Ketu, true node)Usually within 0.6°, using the Meeus periodic correction
Lagna sidereal longitudeCross-checked against the reference charts
D1 rashi placementExact match against the reference charts for all 9 grahas, with degrees inside ±0.5°
D9 (navamsa)Derived by the classical BPHS rule and checked for consistency with D1. The reference charts publish navamsa only as an image, so it is not matched placement by placement
AshtakootThe koot tables come from BPHS Ch. 7, Muhurta Chintamani and Brihat Samhita. The reference almanac publishes no per-pair totals (its matcher is a form), so totals are not matched pair by pair. The Yoni koota table is pinned cell by cell (see Yoni koota below) and agrees with ten spot values other matchers publish
Varjyam windowsCount and position checked against the reference almanac over a 61-day sweep covering two nakshatra cycles. All 62 windows land within 2 min, and most of that gap is the almanac rounding for display
Sade Sati arc start/endWithin 1 to 2 days of authoritative ephemerides. Since 5.4 nextArcStart also counts Saturn re-entering an arc sign in retrograde, which it used to skip, landing as much as about 22 and a half years late
Amrit Kala windowsAnchored to the nakshatra, 4 elastic ghatikas wide. The 27 offsets come from 54 reference-almanac windows covering all 27 nakshatras, and they agree to within 0.1 ghati
Dur Muhurta windowsClassical Muhurta-Chintamani ordinals. Checked against 58 consecutive reference-almanac day-pages in two cities with no exceptions, and one full week matched to ±2 min
Choghadiya / GowriNames and boundaries checked against 14 consecutive reference-almanac nights in two cities

Detection conventions

ElementConvention
Aadal / VidaalThe classical Moon-from-Sun nakshatra-distance rule (AstroShastra, HoraSarvam, Ernst Wilhelm). This is NOT the Tamil-Vakya weekday rule that some online panchangs use
VarjyamA window belongs to the Hindu day its start falls in, which is how the reference almanac attributes them. A start before sunrise belongs to the previous day. Mula has two tyajya spells, at elapsed ghatikas 20 and 56; the reference almanac, ProKerala and Raman’s Muhurta all agree
Do Ghati MuhurtaThe same 30-name deity-keyed sequence applies every day. It does not rotate by weekday
Brahma MuhurtaThe 14th of the 15 night muhurtas, with the night running from sunset to the next sunrise: from two night muhurtas before sunrise to one, about 95 to 47 minutes before it at Pune on 20 March 2025. Up to 5.3 it was daylight/30 wide (half a day muhurta) and ended that much before sunrise: about 48 to 24 minutes before it on the same day. No reference-almanac capture prints Brahma Muhurta itself, so it is not matched directly. Its midpoint is exactly the start of Pratah Sandhya, and that start is within a minute of the almanac on all 50 captured day pages, to the printed minute on 48 of them
Yoni kootaFive levels since 5.4: 4 same animal, 3 friendly, 2 neutral, 1 unfriendly, 0 enemy (the old table never gave 3). Muhurta Chintamani fixes only the seven enemy pairs. The other cells are the chakra of Mahidhar Sharma’s tika on it, as Frawley and the Jagannatha Hora port PyJHora carry it: PyJHora’s table cell for cell, except horse and deer (3) and tiger and lion (2), which follow the printed chakra. 550 of the 1,296 pairs of natal Moons change total under it
Pathu Porutham YoniA Tamil pass/fail test that fails only on the seven enemy pairs: horse and buffalo, elephant and lion, sheep and monkey, snake and mongoose, dog and deer, cat and rat, cow and tiger. Since 5.4 it no longer reads the Ashtakoot Yoni score. Snake and rat, which some Tamil lists add, is not an enemy pair here

Festival day resolution

Festivals are not picked by the tithi at sunrise alone. Since 5.4 the rules follow the days the reference almanac publishes. A rule names the window its tradition uses, and the day is chosen by how the tithi falls in that window on the candidate days. Each was checked against published dates: the reference almanac first, then AstroSage and other almanacs, with the classical rule (Nirnaya Sindhu, Dharma Sindhu) as the tie-breaker. Over five cities and 1900 to 2100, no once-a-year festival fires twice in a year and every monthly one fires at most once per paksha or month, except Phagli and Pradosh, whose rules are deferred (below). Up to 5.3 most of them were listed on two consecutive days in some years. A few festivals still fall on no day in some years. At all five cities (New Delhi, Mumbai, Chennai, Kolkata and Pune), Maha Shivaratri and Vasant Panchami are missing in 1983 and Krishna Janmashtami in 2088. Mumbai also has no Krishna Janmashtami in 2026.

RuleUsed by
sunrise (default)Everything not listed below, among them Ugadi, Hanuman Jayanti, Navaratri, Durga Ashtami, Anant Chaturdashi and the Guru, Sharad, Kartika and Vat Savitri Purnimas. When the tithi holds two sunrises, the first day takes it, as the reference almanac publishes (Anant Chaturdashi 2018-09-23, Ghatasthapana 2015-10-13). Saddula Bathukamma falls on Durgashtami
sunrise, second dayHariyali, Kajari and Hartalika Teej, Gangaur and Jagannath Rath Yatra take the second of two sunrise days (Hartalika Teej 2006-08-27)
three muhurtasRaksha Bandhan, Yajur Upakarma, Nag Panchami and Akshaya Tritiya: the first sunrise day on which the tithi lasts at least three muhurtas (a fifth of the daytime), else the day it begins
madhyahna (the third fifth of daytime)Ganesh and Vinayaka Chaturthi: the day whose madhyahna holds more of the tithi, the earlier day on a tie or when both windows are full. Rama Navami: the last day whose madhyahna the tithi touches
sangava (to two fifths of daytime)Vasant Panchami: the first day on which Panchami has begun by two fifths of the daytime
aparahna (the fourth fifth of daytime)Vijayadashami: the first day whose whole aparahna holds Dashami, else the larger overlap, else the sunrise day. A next day with Dashami and Shravana at sunrise and Shravana in its aparahna takes over from a day whose aparahna has none. Pinned across 11 reference-almanac years. Bhai Dooj and Vat Savitri Amavasya: the last day whose aparahna the tithi touches. Sama Upakarma applies aparahna to the nakshatra rather than the tithi
pradosha (sunset to a fifth of the night after)Diwali, Dhanteras and Parashurama Jayanti: the day whose pradosha holds more of the tithi, the earlier day on a tie or when both windows are full. Pradosh vrat: the same test on Trayodashi, reproducing every reference date for New Delhi in 2025 and 2027
nishita (the 8th of 15 night muhurtas)Maha and Masik Shivaratri: a day whose whole nishita holds Chaturdashi wins, the later if both do; otherwise the larger overlap, the earlier on a tie; with no overlap, the day the tithi begins
arunodaya (96 minutes before sunrise)Narak Chaturdashi: the first day whose arunodaya the tithi touches, else the day it begins
daytimeGovardhan Puja: the day whose daytime holds more of Pratipada, the earlier day on a tie or when both are full
two muhurtas before sunsetMaha Navami: the first day on which Navami has begun two muhurtas before sunset (2015-10-21, 2027-10-08)
Holika DahanNew in 5.4. holika_dahan is the Phalguna Purnima evening whose pradosha holds Purnima free of Bhadra, else the evening the reference almanac's Bhadra ladder picks. holi (Rangwali Holi) is the next day: 3 and 4 March 2026 at New Delhi
anchored daysChhath: Sandhya Arghya on the Shashthi sunrise day, with Nahay Khay two days before it, Kharna one day before and Usha Arghya one day after
weekday before a tithiVaramahalakshmi: the Friday in the seven days that end on the Shravana Purnima sunrise day
chandrodaya (moonrise)Karva Chauth and Sankashti Chaturthi. Falls back to sunrise when the tithi misses both moonrises, and drops the duplicate when it spans two
janmashtami-nishitaKrishna Janmashtami. The udaya-Ashtami day wins whenever Ashtami or Rohini touches its nishita muhurta. Otherwise the day whose nishita Ashtami covers takes it, Saptami-viddha or not. Pinned across 7 reference-almanac years
nakshatra, one day per transitMasik Karthigai: one day per Krittika transit, the first day Krittika holds at sunset, else at sunrise. karthigai_deepam (new in 5.4, regions all and tamil-nadu) takes the place of the Masik Karthigai nearest the full moon of the Tamil month Karthigai. Onam: one day a year, the Thiruvonam of Chingam, and the later of two Thiruvonams in one Chingam (Kochi 2024-09-15 and 2013-09-16)
month and weekdayShravan Somvar, Mangala Gauri, Kartik Somvar and Magha Shanivar follow masaSystem. The default purnimanta gives the North Indian dates (Sawan Somwar 2025 at New Delhi: 14, 21 and 28 July and 4 August), amanta the southern ones, and region nepal the solar month. Since 5.4 this changes the default output
sunrise + kshaya containmentSince 5.2 the sunrise default gives a kshaya (skipped) tithi to the Hindu day that fully contains it. Ugadi is the case that matters, and because its tithi is Shukla Pratipada the masa is read from the following day. Only Phagli still opts out

Calendar-day rules checked against the reference almanac

RuleEvidence
Sankranti observance dayA transit in daylight keeps its civil day. A transit between sunset and the next sunrise is observed on the next sunrise’s day. The full 2027 table is pinned, day plus transit moment, to within 2 min. Since 5.4 the day also reads correctly in the location’s zone west of UTC, pinned for New York 2027 against the almanac’s rule worked by hand
Regional solar new yearsPuthandu, Baisakhi, Vishu and Pohela Boishakh each read the transit moment differently, and split across two dates in a year. 20 region-years are pinned across 2025–2029
Odia new year (Pana Sankranti)Since 5.4 getHinduNewYear(year, 'odisha', location, options) is the Mesha Sankranti day: the transit's civil date, or, when the transit falls later than 0.315 of the way through the night after sunset, the date of the sunrise that ends that night. No textbook Odia rule reproduces the reference almanac's Bhubaneswar dates, so the cutoff is fitted to them (2024-04-13 for a 21:15 transit, 2028-04-14 for 21:47). Being a fraction of the local night, it depends on the location: 2028 is 04-13 at New Delhi. Ten Bhubaneswar dates are pinned, six from the almanac and four public-holiday listings
Ekadashi Smarta / Vaishnava splitWhen the reference almanac prints the fast on two days, the earlier day is Smarta and the later one Vaishnava. That holds for all four geometries that split: Dashami-viddha, vriddha Dwadashi, kshaya and Trisprisha. Every two-day pair the almanac publishes across 2024–2028 is pinned, plus a same-day control
Kshaya / vriddha / Trisprisha EkadashiThe 2026 (24-date) and 2027 (25-date) reference-almanac fast lists reproduce exactly
Adhika masaUses the true bounding new moons. In Adhika-Chaitra years the celebrated (nija) pratipada is the one resolved. Since 5.4 a kshaya Pratipada right after an adhika month still gives Ugadi, Gudi Padwa and Navaratri, and getHinduNewYear on a kshaya Chaitra Shukla Pratipada returns the day that contains it, the day Ugadi falls on (2026-03-19 at New Delhi, where 5.3 gave the 20th)

See also Festivals, and Upgrading 5.3 → 5.4 for what these rules changed in cached output.