You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most accurate open-source Chinese calendar engine. Solar terms verified to 1.05 seconds mean against JPL DE441 across 2,300 years of history. Zero dependencies. TypeScript.
Accuracy
Every result is computed from first principles — full VSOP87D (2,425 terms) with a DE441-fitted correction polynomial, IAU2000B nutation, and Meeus Ch. 49 lunar algorithms — then validated against JPL's numerical ephemeris.
vs JPL DE441 (primary reference):
Test
Range
Result
Solar term timing
209–2493 CE (1,008 terms)
mean 1.05 s, max 3.05 s
Equation of Time
2024 (366 days)
max 0.03 s
Planetary longitude
1900–2100 (808 epochs)
1–14″ mean
Lunar phase timing
2000–2024 (594 phases)
3.6″ mean elongation error
vs sxwnl (寿星万年历, the most widely-cited open-source alternative):
Metric
stem-branch
sxwnl
Mean solar term error (vs JPL)
1.05 s
2.38 s
Max solar term error (vs JPL)
3.05 s
7.18 s
Validated range
209–2493 CE
1900–2100 CE
Extended computation
10,392 terms, 0 failures
—
Timeline where equal or better
98.9%
1.1%
Full methodology with 14 charts, polynomial analysis, and 7,000-year extended range data: Accuracy Report
Install
npm install @4n6h4x0r/stem-branch
Zero production dependencies. Works in Node.js, browsers, and edge runtimes.
One call, everything at once — four pillars, lunar date, solar terms, zodiac, day fitness, flying stars, almanac flags, Six Ren chart, eclipses, and element analysis:
Chinese astronomical calendar, bazi (四柱八字), and divination for TypeScript. Solar terms (節氣) to sub-second precision, lunar calendar (農曆), flying stars (紫白九星), almanac flags (神煞), Six Ren (大六壬) — zero dependencies.