Home › Chinese 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
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
date | date | default today | Civil date in China Standard Time (UTC+8), 1900–2100; defaults to the current UTC date. |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
lunar_year | integer | Lunar year number (the year that began at the preceding Chinese New Year). | |
lunar_month | integer | Lunar month number 1–12. | |
is_leap_month | boolean | true when the date falls in an intercalary month (闰月 runyue). | |
lunar_day | integer | Day of the lunar month, 1–30. | |
lunar_date_chinese | string | Written form, e.g. 二〇二六年八月十四. | |
lunar_date_text | string | Readable form, e.g. 8th lunar month, day 14 (八月十四). | |
month_name | string | Traditional month name (正月 … 腊月, prefixed 闰 for a leap month). | |
day_name | string | Traditional day name (初一 … 三十). | |
month_days | integer | Length of this lunar month (29 or 30). | |
leap_month_this_year | integer | Number of the leap month in this lunar year, 0 when the year has none. | |
year_ganzhi | string | Sexagenary year of the lunar year, e.g. 丙午. | |
year_ganzhi_pinyin | string | Pinyin of the year ganzhi, e.g. Bingwu. | |
year_english | string | Stem element and zodiac animal, e.g. Fire Horse. | |
zodiac | string | Zodiac animal of the lunar year with its character, e.g. Horse (马). | |
nayin_year | string | Nayin melodic element of the year ganzhi, e.g. 天河水 · Milky-way Water. | |
month_ganzhi | string | Sexagenary month by solar-term months (节气月): 寅 month starts at 立春, stems by the 五虎遁 rule. | |
month_ganzhi_pinyin | string | Pinyin of the month ganzhi. | |
day_ganzhi | string | Sexagenary day (continuous 60-day cycle; 1949-10-01 = 甲子). | |
day_ganzhi_pinyin | string | Pinyin of the day ganzhi. | |
weekday | string | Day of the week. | |
current_solar_term | string | Solar-term period the date falls in and the date it began. | |
next_solar_term | string | Next solar term and its date. | |
days_to_next_term | integer | days | Days until the next solar term. |
is_solar_term_day | boolean | true when the date is itself a solar-term day. | |
festival | string | Traditional festival(s) on this day (春节, 元宵节, 龙抬头, 上巳节, 端午节, 七夕, 中元节, 中秋节, 重阳节, 寒衣节, 下元节, 腊八节, 小年, 除夕, 清明节, 冬至) or "none". | |
julian_day_number | integer | Julian 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
- API:
GET https://tttkmbb.com/api/v1/calculate/lunar-calendar-converter(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/lunar-calendar-converter · Markdown: https://tttkmbb.com/lunar/lunar-calendar-converter.md · JSON definition: https://tttkmbb.com/lunar/lunar-calendar-converter.json
- MCP: server
https://tttkmbb.com/mcp, toolconvert_solar_to_lunar - OpenAPI operationId:
convert_solar_to_lunar - Freshness:
daily. Authentication: none. Rate limit: fair use (see rate limits).
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
- Lunar to Solar Date Converter — Reverse conversion from a lunar date to the Gregorian date.
- Chinese Zodiac Calculator (生肖) — Zodiac sign of a birth date with the 立春 boundary option and compatibility tables.
- Moon Phase Calculator — Astronomical moon phase and illumination for the same date.