Skip to content
Tết −50%Đoàn Viên, only 99,500 VND first yearĐoàn Viên, first year only 99,500 VND, 1 personal reading a yearSee the offer

Blog

How Nhat Nguyet computes the lunar calendar and the 24 solar terms, and how far off it is

Distribution of solar term errors against IMCCE over 4,824 moments, before and after 19 November 2026

Nhat Nguyet's lunar calendar is an astronomical computation, not a copy of printed almanacs. New moons are computed with Jean Meeus's formulas and the 24 solar terms with the VSOP87D theory of the Sun, then months are built by the traditional lunisolar rules in Vietnam time, UTC+7. Measured over 1900 to 2100: new moons are on average 1.1 minutes from NASA, solar term moments 0.27 minutes from IMCCE, and no moment is more than a minute off.

Which computations build the lunar calendar?

Three steps, each one checkable:

  1. New moon, when the Moon lies between the Earth and the Sun: Meeus's truncated series, with a ΔT correction.
  2. Principal terms, when the Sun crosses a multiple of 30 degrees of ecliptic longitude: the Sun's longitude from a three-term equation of centre.
  3. Building months: day 1 is the date containing the new moon in local time; month 11 is the month containing the winter solstice; in a 13-month year the leap month is the first month after month 11 without a principal term.

The 24 solar term moments use a separate, finer model: the Sun's apparent longitude from the truncated VSOP87D theory (Bretagnon and Francou, IMCCE), converted to the FK5 frame, with IAU 1980 nutation and aberration, ΔT from the Espenak and Meeus polynomials (NASA, 2006), solved by iteration to under a second and rounded to the minute. This model is in use since 19 November 2026.

What is ΔT, and why does dropping it shift the calendar?

ΔT is the gap between uniform astronomical time (TT) and time kept by the Earth's rotation (UT). The Earth slows unevenly, so ΔT changes by year: about 64 seconds in 2000, 75 seconds in 2026, and by the extrapolated polynomial 203 seconds in 2100. Astronomical formulas give TT; to reach clock time ΔT must be subtracted, or every moment shifts by that amount.

How large is the measured error?

We compared against three independent astronomical sources over all of 1900 to 2100:

ComparisonMomentsMean absolute errorP95Largest
New moons against NASA2,4741.1 min2.5 min3.9 min
Solar term moments against IMCCE (Paris Observatory)4,8240.27 min0.6 min0.9 min
Equinoxes and solstices against USNO8040.2 min1 min2 min
  • Our solar term moments are earlier than IMCCE at 2,565 moments and later at 2,259, −0.04 minutes on average: no longer skewed to one side.
  • IMCCE and USNO differ from each other by at most 1.73 minutes, so the two are firm enough to serve as the yardstick.
  • Solar term moments are given to the minute, so most of the remaining error is rounding. Against USNO, the 2-minute differences fall in years after 2080, where the two observatories assume different future ΔT.
  • Before 19 November 2026, solar terms used Meeus's three-term equation of centre, accurate to about 0.01 degree (roughly 15 minutes): 4.2 minutes from IMCCE on average, 14.4 at most, earlier at 3,758 moments. The image at the top puts the two distributions side by side.

Can a few minutes change the date?

Only when a moment falls close to midnight.

  • Day 1 of the month: 2,472 of 2,474 new moons fall on the right date; the other two (9 Dec 2072, 19 Oct 2085) are new moons near midnight.
  • Independent rebuild: we rebuilt the UTC+7 lunar calendar from NASA new moons and IMCCE principal terms alone, giving 2,461 months from 12/1901 to 11/2100. 2,459 months match, including 73 leap months; the two that differ are exactly the two near-midnight new moons above.
  • Solar term dates: all 4,824 moments fall on the same date as IMCCE. The model used before 19 November 2026 put 10 on the neighbouring date, all within 15 minutes of midnight.

Which country's calendar uses which time zone?

With the same rules, a different time zone can move day 1. The open library lets you pick each country's calendar:

CalendarTime zone usedCountries, regions
Vietnam (default)UTC+7Vietnam
ChinaUTC+8China, Taiwan, Hong Kong, Macau; Lunar New Year of Chinese communities in Singapore, Malaysia, Indonesia, the Philippines
KoreaUTC+9South Korea
JapanUTC+9The old lunar calendar (kyūreki), used for traditional festivals

Mongolia, Tibet, Thailand, Laos, Cambodia, Myanmar and India follow calendars with different rules, not yet in the library.

From 1900 to 2100, 2,814 days have different lunar dates in UTC+7 and UTC+8, and Tết differs in 10 years; against UTC+9 it is 5,632 days and 21 years. The clearest case is 1985: the Vietnamese calendar's Tết fell on 21 January, the UTC+8 calendar's on 20 February, because the Chinese calendar had a leap month 10 in 1984 while the Vietnamese one had a leap month 2 in 1985.

Years when Tết differs between UTC+7, UTC+8 and UTC+9, 1900 to 2100
Years when Tết differs between UTC+7, UTC+8 and UTC+9, 1900 to 2100

What are the limits of this computation?

  • Not yet checked against each country's official tables. The UTC+8 and UTC+9 figures above come from the same algorithm with a different time zone.
  • Every year uses UTC+7. Vietnamese almanacs followed Beijing time, UTC+8, until 8 August 1967 in the North and until 1975 in the South, so in a few years the printed date differs from ours: Tết 1965 was printed as 2 February, we give 1 February; Tết 1969 in the South was 17 February, we give 16 February.
  • A moment within a minute of midnight could still land on the neighbouring date; from 1900 to 2100 there is none.

How can you check it yourself?

Every open-data release carries a model profile: formula names, ΔT, comparison files with sha256 hashes, and all the error figures above. The profile is on the Open data page; the code and test cases are on the Open code and data page.

Vietnamese lunar calendarToday's lunar date, what day it is and its good hours, or any other day.Try it

If you reuse these figures, please credit: Data: Nhat Nguyet (nhatnguyet.org).

More from the blog

All blog posts