toolfree

Lunar calendar converter

Convert any date between the Gregorian and Chinese lunisolar calendars, 1900–2100, with the stem-branch year, zodiac animal and solar term. Computed from astronomy, not guessed.

Runs in your browser

Lunar date
Stem-branch year
Zodiac animal
Weekday
Solar term
Next term

Dates are civil days at UTC+8, which is where the calendar is defined.

The calendar is astronomy, not arithmetic

There is no formula for the Chinese calendar. A converter is a table, and the table is the answer to two astronomical questions asked over and over:

  1. When is the Moon new? A month begins on the civil day containing the new moon. Not the day after, not the first sighting of the crescent — the day containing the instant of conjunction.
  2. When does the Sun cross a multiple of 30° of ecliptic longitude? Those twelve instants are the 中氣, the major solar terms, and they are what keep the lunar months tied to the seasons.

Both are evaluated at UTC+8, because the calendar is defined there and always has been. That is not a detail. A new moon at 00:14 Beijing time starts a month a day earlier than the same new moon reported as 16:14 the previous day in UTC.

The three rules

The rule most explanations get wrong

You will read that “a month with no 中氣 is a leap month”. That is not the rule, and it is not true.

Take 正月 1985, which ran from 20 February to 20 March. It contains no 中氣: 雨水 fell on 19 February, the day before it began, and 春分 fell on 21 March, the day after it ended. By the popular rule it should be a leap month. It is not — 1985 has no leap month at all.

The reason is the rule’s actual scope. The count is taken over the 歲, solstice to solstice, and that 歲 ran to only twelve months. 冬月 1984 happened to contain two 中氣 — 冬至 on 22 December and 大寒 on 20 January, twenty-nine days apart inside a thirty-day month — which left one for 正月 to go without. With twelve months there is nothing to insert, so nothing is inserted.

Near perihelion in early January the Earth moves fastest, the solar terms crowd to about 29½ days apart, and a 30-day month can swallow two of them. That is when this happens.

Leap months are not evenly spread

Across the 201 years in this table there are 74 leap months, and they are wildly lopsided:

Leap monthTimes in 1900–2100
閏四月14
閏五月14
閏六月12
閏三月 · 閏二月 · 閏七月8 each
閏八月7
閏九月1 — only 2014
閏十月1 — only 1984
閏十一月1 — only 2033
閏正月 · 閏十二月never

The cause is the Earth’s orbit. Aphelion falls in early July: the Sun crawls, consecutive 中氣 stretch to about 31.4 days apart, and a 29- or 30-day month can easily fall between two of them and catch neither. Around perihelion in early January the opposite holds — the terms crowd to about 29.4 days apart, and a month that contains none is close to impossible.

So 閏十一月 2033 is not a curiosity, it is the rarest thing the calendar does, and it is exactly why several published almanacs got that year wrong.

Why the table stops at 1900 and 2100

Nothing prevents extending it. What prevents trusting it is ΔT — the drift between the Earth’s rotation and uniform time. Before about 2005 it is measured. After that it is extrapolated, and by 2100 the extrapolation is uncertain by a minute or so.

A minute matters only for an instant already sitting within a minute of midnight, and across two centuries there are sixteen of those. The worst is a new moon on 28 September 2057 that falls two seconds before midnight in Beijing. Published calendars have disagreed about that month, and they will go on disagreeing; nobody is wrong, the question is simply finer than the data.

The other close calls are worth naming, because they are the same kind of thing: 大寒 1979 and 雨水 1923 both land within three seconds of midnight, and 冬至 2021 fell at 23:59:19.

How this table was made

It is generated at build time from Meeus’s algorithms — chapter 49 for the phases of the Moon, chapter 25 with the VSOP87 series for the Sun — reduced to civil days at UTC+8, and then the rules above are applied to it.

The generator refuses to emit anything unless the result matches every published date it checks: 29 Lunar New Years spread from 1900 to 2100, 31 leap months including 2033, eleven years asserted to have none, and twelve solar terms. Those anchors are asserted again by the test suite, so a regeneration cannot quietly change the calendar.

Everything then runs in your browser. The table is about 11 kB.

What else the page shows

The stem-branch year (干支) is the sexagenary cycle: ten stems against twelve branches, repeating every sixty years rather than every twelve. 2024 is 甲辰 — wood dragon — and so was 1964, and so will be 2084.

The solar term is where the date sits in the solar year, with the next one and how far off it is. If you want the whole year’s worth, the solar terms table lists all twenty-four.

The zodiac animal changes at Lunar New Year, not on 1 January — which catches more people than anything else here, and has its own page.