Home › Chinese Calendar › Sexagenary Cycle Calculator (干支)
Sexagenary Cycle Calculator (干支)
Converts a year to its sexagenary name (干支 ganzhi: heavenly stem 天干 + earthly branch 地支) or a ganzhi name back to the matching years, with the stem element, yin/yang, zodiac animal, nayin (纳音), position in the 60-year cycle and the full 60-entry table.
When to use
You need the ganzhi of a year (e.g. 2026 = 丙午), the years that carry a given name such as 甲子 or 辛亥, or the whole 60-year cycle with its nayin elements.
Do not use when: You need the ganzhi of a day, month or hour for a date (use lunar-calendar-converter or chinese-hour), or the zodiac for a birth date near Chinese New Year (use chinese-zodiac).
Formula
index = (year − 4) mod 60 (0 = 甲子); stem = index mod 10; branch = index mod 12; cycle_position = index + 1; cycle_start_year = year − index; matching years = year₀ + 60·k
The cycle has run continuously since antiquity, so any year number maps to one of the 60 names; 4 CE was a 甲子 year, 1984 began the current cycle. Names are valid only when stem and branch share the same polarity (60 of 120 combinations). Traditional calendar/cultural reference calculation; not a prediction, medical, legal or financial advice.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
year | integer | no | Year number to name (proleptic Gregorian/astronomical year; the ganzhi year is counted from Chinese New Year or 立春). Give year or ganzhi. Range: ≥ 1, ≤ 2999 | |
ganzhi | string | no | Sexagenary name to look up: characters (丙午) or pinyin (Bingwu, bing wu). Give year or ganzhi. | |
range_start | integer | default 1900 | First year of the range searched for matching years. Range: ≥ 1, ≤ 2999 | |
range_end | integer | default 2100 | Last year of the range searched for matching years. Range: ≥ 1, ≤ 2999 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
ganzhi | string | Sexagenary name, e.g. 丙午. | |
pinyin | string | Pinyin of the name, e.g. Bingwu. | |
stem | string | Stem with pinyin, element and polarity, e.g. 丙 (Bing) – Yang Fire. | |
branch | string | Branch with pinyin and zodiac animal, e.g. 午 (Wu) – Horse (马). | |
year_english | string | Stem element and animal, e.g. Fire Horse. | |
nayin | string | Nayin melodic element of the pair, e.g. 天河水 · Milky-way Water. | |
cycle_position | integer | 1 (甲子) to 60 (癸亥). | |
year_used | integer | The year the position and cycle refer to (the input year, or the first matching year in the range). | |
cycle_start_year | integer | Year of 甲子 that begins the 60-year cycle containing year_used. | |
cycle_end_year | integer | Last year (癸亥) of that cycle. | |
matching_years | number_list | Years with this ganzhi between range_start and range_end. | |
sexagenary_table | list | 60 rows: position, ganzhi, pinyin, element (stem), animal, nayin, year (in the cycle containing year_used). |
Example
2026 → 丙午: {"year":2026} → {"ganzhi":"丙午","pinyin":"Bingwu","cycle_position":43,"cycle_start_year":1984,"year_english":"Fire Horse","nayin":"天河水 · Milky-way Water","matching_years":[1906,1966,2026,2086]}
甲子 years 1900–2100: {"ganzhi":"甲子","range_start":1900,"range_end":2100} → {"matching_years":[1924,1984,2044],"cycle_position":1,"year_english":"Wood Rat","nayin":"海中金 · Sea Metal"}
GET https://tttkmbb.com/api/v1/calculate/sexagenary-cycle?year=2026
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/sexagenary-cycle(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/sexagenary-cycle · Markdown: https://tttkmbb.com/lunar/sexagenary-cycle.md · JSON definition: https://tttkmbb.com/lunar/sexagenary-cycle.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="sexagenary-cycle" - OpenAPI operationId:
convert_sexagenary_year - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
FAQ
When does a ganzhi year start?
Not on 1 January: the lunar calendar switches at Chinese New Year and Bazi practice at 立春 (about 4 February). A January date usually belongs to the previous ganzhi year; use chinese-zodiac or lunar-calendar-converter for a specific date.
Why is 甲丑 rejected?
Stems and branches advance together, so an odd (yang) stem always meets an odd (yang) branch: only 60 of the 120 pairings occur. 甲 pairs with 子, 寅, 辰, 午, 申, 戌.
Related calculators
- Chinese Zodiac Calculator (生肖) — Zodiac sign and relationships for a birth date with the year boundary handled.
- Lunar Calendar Converter (农历) — Ganzhi of the year, month and day for a given date.
- Chinese Double-Hour Calculator (时辰) — Ganzhi of the double-hour for a time of day.