HomeChinese Calendar › Lunar Calendar Converter (农历)

Lunar Calendar Converter (农历)

Converts a Gregorian date to the Chinese lunisolar calendar (农历 nongli): lunar year, month (with leap-month flag), day, the sexagenary stems and branches (干支 ganzhi) of year, month and day, zodiac animal, nayin (纳音), the current 24-solar-term period and any traditional festival on that day.

When to use

You need the Chinese lunar date, ganzhi day/month/year, zodiac year or current solar term for a given Gregorian date (defaults to today).

Do not use when: You start from a lunar date and need the Gregorian date (use lunar-to-solar), need a person's zodiac with the 立春 boundary option (use chinese-zodiac), or need the astronomical moon phase (use moon-phase).

Formula

lunar month = interval between successive new moons (instants at 120° E, UTC+8); month 11 contains the winter solstice; a leap month is the first month without a major solar term (中气) in a 13-month solstice-to-solstice suite; year_ganzhi index = (lunar_year − 4) mod 60; day_ganzhi index = (JDN + 49) mod 60; month branch = 寅 from 立春, one branch per odd solar term

Astronomical computation (Meeus VSOP87 solar longitude, Meeus ch. 49 new moons, Espenak–Meeus ΔT) following the GB/T 33661-2017 rules, checked against Hong Kong Observatory tables; pre-1929 dates use Beijing local mean time as the published calendars did. Traditional calendar/cultural reference calculation; not a prediction, medical, legal or financial advice.

Inputs

ParameterTypeUnitRequiredDescription
datedatedefault todayCivil date in China Standard Time (UTC+8), 1900–2100; defaults to the current UTC date.

Outputs

OutputTypeUnitDescription
lunar_yearintegerLunar year number (the year that began at the preceding Chinese New Year).
lunar_monthintegerLunar month number 1–12.
is_leap_monthbooleantrue when the date falls in an intercalary month (闰月 runyue).
lunar_dayintegerDay of the lunar month, 1–30.
lunar_date_chinesestringWritten form, e.g. 二〇二六年八月十四.
lunar_date_textstringReadable form, e.g. 8th lunar month, day 14 (八月十四).
month_namestringTraditional month name (正月 … 腊月, prefixed 闰 for a leap month).
day_namestringTraditional day name (初一 … 三十).
month_daysintegerLength of this lunar month (29 or 30).
leap_month_this_yearintegerNumber of the leap month in this lunar year, 0 when the year has none.
year_ganzhistringSexagenary year of the lunar year, e.g. 丙午.
year_ganzhi_pinyinstringPinyin of the year ganzhi, e.g. Bingwu.
year_englishstringStem element and zodiac animal, e.g. Fire Horse.
zodiacstringZodiac animal of the lunar year with its character, e.g. Horse (马).
nayin_yearstringNayin melodic element of the year ganzhi, e.g. 天河水 · Milky-way Water.
month_ganzhistringSexagenary month by solar-term months (节气月): 寅 month starts at 立春, stems by the 五虎遁 rule.
month_ganzhi_pinyinstringPinyin of the month ganzhi.
day_ganzhistringSexagenary day (continuous 60-day cycle; 1949-10-01 = 甲子).
day_ganzhi_pinyinstringPinyin of the day ganzhi.
weekdaystringDay of the week.
current_solar_termstringSolar-term period the date falls in and the date it began.
next_solar_termstringNext solar term and its date.
days_to_next_termintegerdaysDays until the next solar term.
is_solar_term_daybooleantrue when the date is itself a solar-term day.
festivalstringTraditional festival(s) on this day (春节, 元宵节, 龙抬头, 上巳节, 端午节, 七夕, 中元节, 中秋节, 重阳节, 寒衣节, 下元节, 腊八节, 小年, 除夕, 清明节, 冬至) or "none".
julian_day_numberintegerJulian Day Number of the civil date.

Example

2026-09-24 (八月十四, 丙午年): {"date":"2026-09-24"}{"lunar_month":8,"lunar_day":14,"is_leap_month":false,"lunar_date_chinese":"二〇二六年八月十四","year_ganzhi":"丙午","month_ganzhi":"丁酉","day_ganzhi":"辛丑","zodiac":"Horse (马)","current_solar_term":"秋分 (Qiufen, Autumn Equinox) since 2026-09-23","days_to_next_term":14,"festival":"none","julian_day_number":2461308}

2025-07-25 (闰六月初一): {"date":"2025-07-25"}{"lunar_month":6,"is_leap_month":true,"lunar_day":1,"lunar_date_chinese":"二〇二五年闰六月初一","year_ganzhi":"乙巳","zodiac":"Snake (蛇)","leap_month_this_year":6,"month_days":29}

GET https://tttkmbb.com/api/v1/calculate/lunar-calendar-converter?date=2026-09-24

Machine access

Sources

FAQ

Which time zone decides the lunar date?

New moons and solar terms are evaluated in China Standard Time (UTC+8, 120° E) as the official calendar prescribes; the date you enter is taken as a civil date in that zone. Dates before 1929 use Beijing local mean time (UTC+7:45:40), reproducing the calendars published then.

Why can the year ganzhi differ between sources?

Almanacs tied to the lunar calendar switch the year at Chinese New Year (used here); Bazi (八字) practice switches it at 立春. Between the two dates the two conventions give different years; a note flags this when it applies.

How are month ganzhi assigned?

By solar-term months: the 寅 month begins at 立春 and each following odd term (惊蛰, 清明 …) starts the next branch; the stem follows the 五虎遁 rule from the year stem.

Related calculators