Ganzhi: how the 60-part stem-and-branch cycle works
Heavenly stems and earthly branches
Ganzhi (干支), the stem-and-branch cycle, combines one of ten heavenly stems with one of twelve earthly branches. The stem comes first: Jia-Zi consists of Jia and Zi, while Bing-Wu consists of Bing and Wu. The pairs can label several units of time, so the accompanying word “year,” “month,” “day” or “hour” is essential.
| Position | Heavenly stem | Earthly branch |
|---|---|---|
| 1 | Jia 甲 | Zi 子 |
| 2 | Yi 乙 | Chou 丑 |
| 3 | Bing 丙 | Yin 寅 |
| 4 | Ding 丁 | Mao 卯 |
| 5 | Wu 戊 | Chen 辰 |
| 6 | Ji 己 | Si 巳 |
| 7 | Geng 庚 | Wu 午 |
| 8 | Xin 辛 | Wei 未 |
| 9 | Ren 壬 | Shen 申 |
| 10 | Gui 癸 | You 酉 |
| 11 | — | Xu 戌 |
| 12 | — | Hai 亥 |
These columns show the two component sequences, not the complete cycle. Wu the stem, 戊, and Wu the branch, 午, are different characters despite their identical untoned spelling.
Why the cycle contains sixty pairs
Begin at the first position of each sequence and advance both by one step. The pairs begin Jia-Zi, Yi-Chou, Bing-Yin and Ding-Mao. Position 10 is Gui-You. The next stem wraps to Jia while the branch continues to Xu, giving Jia-Xu. Two steps later the branch has wrapped as well, producing Bing-Zi.
Both sequences return to their starting positions together after sixty steps: six circuits of the ten stems and five circuits of the twelve branches. Sixty is their least common multiple. The cycle therefore contains sixty pairs rather than all 120 combinations that could be formed by choosing a stem and branch independently.
Odd-numbered stems encounter only odd-numbered branches, and even-numbered stems only even-numbered branches. Jia-Chou, combining positions 1 and 2, never occurs. Wu-Wu does occur: the stem is fifth and the branch seventh. It occupies position 55 in the complete sequence.
For a cycle position n, numbered from 1 to 60, the stem position is 1 plus the remainder of (n − 1) divided by 10. The branch position uses division by 12 instead. At position 41 the results are stem 1 and branch 5, Jia-Chen.
Years, months, days and hours
The same sequence works at different timescales. A Jia-Zi day need not occur in a Jia-Zi year, and the day sequence does not restart at the beginning of a lunar month or year. Traditional hours, shichen, are commonly expressed in the modern clock system as twelve two-hour intervals.
| Label | Information needed to identify it |
|---|---|
| Year pair | The annual boundary and the intended occurrence of the repeating year |
| Month pair | The lunar-month or solar-term-month convention and the applicable year stem |
| Day pair | A position in the continuous sixty-day count and any special late-night convention |
| Hour pair | The time branch and the day stem used to determine its accompanying stem |
The year and month stems are related, as are the day and hour stems. In the usual first-month correspondence, a Jia or Ji year begins its Yin-month sequence with Bing-Yin. In the hour correspondence, a Jia or Ji day gives Jia to Zi time and Yi to the following Chou period. The hour stem is therefore derived from the day stem, not the year stem.
Four stem–branch pairs contain eight Chinese characters. This is the literal basis of Bazi, the four-pillar system used in traditional birth divination.
Boundaries and calendar context
For the Chinese calendar year, the Ganzhi designation changes at Chinese New Year. A year beginning at Lichun, Beginning of Spring, belongs to a different convention, often used in divination. The distinction affects dates between the two annual boundaries.
Month labels require their own distinction. Numbered lunar months belong to the lunisolar calendar. The solar-term months used in many Bazi calculations run between twelve alternating solar terms known as jie. Yin begins at Lichun and Mao at Jingzhe. A leap month does not create an extra solar-term interval. Historical systems that assigned Ganzhi names to lunar months used a different kind of month boundary.
A Lichun-based year may change at midnight at the start of the Lichun date or at the astronomical instant itself. At the shorter timescale of days, a late-night birth can be assigned the next day's pair from 23:00 or retain the civil day's pair until midnight. These conventions affect when a label changes, while the order of the sixty pairs remains the same.