Gregorian ↔ Chinese Lunar Date
ConvertEverything runs locally in your browser — nothing is uploaded
Enter a Gregorian date (`2026-09-27`) to get the Chinese lunar date, the sexagenary (stem-branch) cycle, the zodiac animal, the star sign and any solar term; add a time (`2026-09-27 14:30`) and you also get the double-hour. Switch the direction to go the other way and enter a lunar date, either numerically (`2026-08-17`) or in the Chinese character form the calendar actually uses. The Chinese calendar is not a formula, it is an astronomical table. Which months are long and which years have a leap month depends on where the new moon and the major solar terms (when the sun’s apparent longitude hits a multiple of 30°) fall — both require high-precision astronomical series whose coefficient tables cannot be written from memory. An implementation was attempted first, judged by “do the Spring Festival dates I am sure of come out right”, but there was no reliable reference: get a leap month wrong in one year and the screen still shows a perfectly ordinary lunar date. So this uses an established library and pins it to 28 dates whose answers I know independently (17 Spring Festivals, 6 Mid-Autumns and 5 Dragon Boats from 1980 to 2027 — all matching). That table lives in the tests. A leap month must be stated. A numeric form like `2026-08-17` cannot distinguish the eighth month from the leap eighth month, and the two can be a month apart. So numeric input is always read as a non-leap month — tick the leap-month box when you mean a leap month (the Chinese character form has its own way of writing that marker; the numeric one has no room for it). The double-hours and the midnight problem. The day is split into twelve two-hour blocks beginning with the rat hour at 23:00. The awkward part is that it straddles midnight: 23:00–24:00 and 00:00–01:00 are both the rat hour, but in Chinese numerology the first counts as the next day’s rat hour and the second as the current day’s. This tool gives the clock reading (23:00 is the rat hour) and notes the difference — casting a four-pillar chart follows the other convention, which is a separate matter. ⚠️ This page loads a lunar dataset (about 400 KB) on demand — only when you actually enter a date. No other tool page pays for it. Computed locally; nothing is uploaded.
Features
- Both directions: Gregorian → lunar and lunar → Gregorian (the lunar side accepts either the Chinese character form or plain digits)
- The lunar date in both Chinese characters and digits — characters for reading, digits for computing
- Leap months are labelled, and you must state them on input (a numeric form cannot distinguish them)
- The sexagenary cycle for year, month and day, plus the zodiac animal and star sign
- ⚠️ The star sign comes with its symbol, element (fire / earth / air / water) and date range — beyond “I am a Leo”, those are the two things people actually want
- ⚠️ The date ranges are the conventional fixed dates, not astronomical boundaries: the exact moment the sun enters each sign shifts by hours from year to year, so within a couple of days of a boundary the ephemeris is the authority (the result says so)
- With a time, the double-hour plus a note on the early/late rat hour distinction
- Solar terms and festivals are flagged when they fall on the day
- Days until the next lunar new year — often more useful for planning than the lunar date itself
- The lunar dataset is loaded on demand, so other pages are unaffected
- ⚠️ The lunar arithmetic is pinned to 28 known dates (Spring Festivals, Mid-Autumns and Dragon Boats from 1980–2027); the table is in the tests
How to use
- Enter a Gregorian date (a time may follow, e.g. 2026-09-27 14:30)
- The lunar date, sexagenary cycle, zodiac animal, star sign and solar term appear immediately
- To go the other way, set the direction to lunar → Gregorian and enter the lunar date
- Tick the leap-month box when the lunar month you entered is a leap month
FAQ
- Why use a library for the lunar calendar instead of computing it?
- Because the Chinese calendar is not a formula. It is an astronomical table: which months are long and which years have a leap month depends on where the new moon and the major solar terms (the sun’s apparent longitude reaching a multiple of 30°) fall, and both need high-precision astronomical series. An implementation was attempted, but the problem was having no reliable reference: a coefficient recalled wrongly that misplaces one year’s leap month still renders a perfectly ordinary lunar date — nothing errors, nothing looks odd. So this uses an established MIT-licensed library, pinned to 28 dates whose answers I know independently: 17 Spring Festivals, 6 Mid-Autumns and 5 Dragon Boats between 1980 and 2027, all matching.
- Why must I specify the leap month myself?
- Because a numeric form cannot say. `2026-08-17` could be the eighth month or the leap eighth month, and those can be a month apart on the Gregorian calendar. The Chinese character form has a place to write that marker; the numeric form does not, so it is read as a non-leap month. Tick the leap-month box rather than guessing, whose cost is being a month out.
- Why does the rat hour straddle midnight? Which day is 23:30?
- Because the day is divided into twelve two-hour blocks, so the rat hour necessarily spans midnight (23:00–01:00); that is inherent to the system. The complication is that in four-pillar numerology, a moment after 23:00 counts as the next day’s rat hour, while 00:00–01:00 counts as the current day’s. This tool gives the clock reading — 23:30 is the rat hour, on the same date — and notes the difference next to the result. For a four-pillar chart, use the other convention; the two are not the same thing.
- Why does the sexagenary cycle differ from what I see elsewhere?
- Because the boundaries for year and month are drawn differently. The year here follows the lunar year (starting at the first day of the first month), whereas four-pillar numerology uses the start of spring: someone born before it still carries the previous year’s stem-branch. Likewise the month cycle follows solar terms while lunar months follow new moons, so the two can differ by half a month. When comparing, check which boundary each side used — a one-character difference usually comes from that, not from an error.
Related tools
Baby Milestone Dates
ConvertEnter a birth date to get the date of each milestone, how many days away it is, and the baby’s exact age in years, months and days.
Date Calculator
ConvertCount the days, weeks or months between two dates, or shift a date by any of those. Dates can be picked from a calendar or pasted in — nothing is uploaded.
Timestamp Converter
ConvertConvert Unix timestamps into dates and back, telling seconds, milliseconds, microseconds and nanoseconds apart, with Windows FILETIME and decimals.
Number Base Converter
ConvertConvert numbers between binary, octal, decimal, hex, base 36 and base 64, with long IDs converted digit for digit. Runs in your browser.
Cron Parser
ConvertExplain a cron expression field by field and list the next and previous run times, saying plainly when a schedule can never fire.
Color Converter
ConvertConvert between HEX, RGB, HSL, HWB, CMYK, Lab and OKLCH, with colour temperature, inverse, complement, nearest ANSI colour and WCAG contrast.