How the zodiac and stem-branch cycle work
Modulo formula from year to animal, the ten stems and twelve branches, the New Year versus Start of Spring boundary, the five elements and the harmony and clash relationships.
The zodiac animal and the stem-branch cycle both come from the same year-based modulo formula. Once the year is fixed, the animal, stem, branch, element and yin/yang are all fixed. No table lookup is needed, and nothing changes over time.
The animal formula
The animal index is (year − 4) mod 12: 0 is the Rat, 1 the Ox, 2 the Tiger, and so on up to 11 for the Pig.
Example: 1990 → (1990 − 4) mod 12 = 6 → Horse. The formula works for every year from 1900 to 2099 with no lookup table.
The stem index is (year − 4) mod 10: 0 is Jia, 1 is Yi, and 9 is Gui. The branch index is the same as the animal index, so the stem-branch pair is simply the stem plus the branch.
Heavenly stems and earthly branches
The ten heavenly stems and twelve earthly branches combine into the 60-year cycle. 1984 was Jia-Zi, 2024 was Jia-Chen and 2026 is Bing-Wu. The full cycle repeats every 60 years; the animal repeats every 12 years and the stem every 10.
The ten heavenly stems
| Stem | Pinyin | Element | Polarity |
|---|---|---|---|
| 甲 | jiǎ | Wood | Yang |
| 乙 | yǐ | Wood | Yin |
| 丙 | bǐng | Fire | Yang |
| 丁 | dīng | Fire | Yin |
| 戊 | wù | Earth | Yang |
| 己 | jǐ | Earth | Yin |
| 庚 | gēng | Metal | Yang |
| 辛 | xīn | Metal | Yin |
| 壬 | rén | Water | Yang |
| 癸 | guǐ | Water | Yin |
The twelve earthly branches
| Branch | Animal | Element | Hour | Direction |
|---|---|---|---|---|
| 子 zǐ | 鼠 Rat | Water | 23:00–01:00 | North |
| 丑 chǒu | 牛 Ox | Earth | 01:00–03:00 | North-northeast |
| 寅 yín | 虎 Tiger | Wood | 03:00–05:00 | East-northeast |
| 卯 mǎo | 兔 Rabbit | Wood | 05:00–07:00 | East |
| 辰 chén | 龙 Dragon | Earth | 07:00–09:00 | East-southeast |
| 巳 sì | 蛇 Snake | Fire | 09:00–11:00 | South-southeast |
| 午 wǔ | 马 Horse | Fire | 11:00–13:00 | South |
| 未 wèi | 羊 Goat | Earth | 13:00–15:00 | South-southwest |
| 申 shēn | 猴 Monkey | Metal | 15:00–17:00 | West-southwest |
| 酉 yǒu | 鸡 Rooster | Metal | 17:00–19:00 | West |
| 戌 xū | 狗 Dog | Earth | 19:00–21:00 | West-northwest |
| 亥 hài | 猪 Pig | Water | 21:00–23:00 | North-northwest |
New Year changes the animal; Start of Spring changes the year
The zodiac changes at Chinese New Year, the first day of the first lunar month. The new animal year begins on that day; anyone born earlier in the calendar year still belongs to the previous animal.
Four Pillars (BaZi) astrology instead starts the year at Lichun, the Start of Spring, usually February 3–5. Between Chinese New Year and Lichun the two conventions can therefore disagree: one still uses the previous animal, the other has already moved to the new one.
This site uses the Chinese New Year convention and states the New Year date and the "before New Year" animal on every year page.
| Convention | Boundary | Common use | This site |
|---|---|---|---|
| Chinese New Year | Lunar 1/1 | Folk zodiac, year lookup | Used |
| Start of Spring | February 3–5 | Four Pillars (BaZi) | Explained |
Elements and yin/yang
Stem elements: Jia and Yi are Wood, Bing and Ding Fire, Wu and Ji Earth, Geng and Xin Metal, Ren and Gui Water. Yang stems are Jia, Bing, Wu, Geng and Ren; yin stems are Yi, Ding, Ji, Xin and Gui.
Branch elements: Zi Water, Chou Earth, Yin Wood, Mao Wood, Chen Earth, Si Fire, Wu Fire, Wei Earth, Shen Metal, You Metal, Xu Earth, Hai Water.
The "element" of a year usually refers to its heavenly stem. For example, 2026 is Bing-Wu; Bing is Fire, so it is called the Fire Horse year.
Six Harmony, Three Harmony, clash, harm and punishment
Traditional zodiac relationships fall into five groups. They describe fixed combinations of earthly branches, independent of the year.
- Six Harmony: Rat–Ox, Tiger–Pig, Rabbit–Dog, Dragon–Rooster, Snake–Monkey, Horse–Goat.
- Three Harmony: Monkey–Rat–Dragon, Pig–Rabbit–Goat, Tiger–Horse–Dog, Snake–Rooster–Ox.
- Clash: Rat–Horse, Ox–Goat, Tiger–Monkey, Rabbit–Rooster, Dragon–Dog, Snake–Pig.
- Harm: Rat–Goat, Ox–Horse, Tiger–Snake, Rabbit–Dragon, Monkey–Pig, Rooster–Dog.
- Punishment: Zi–Mao, Yin–Si–Shen, Chou–Xu–Wei, plus the self-punishment pairs Chen–Chen, Wu–Wu, You–You and Hai–Hai.
These are folk classifications, not scientific conclusions, and not advice about marriage, business or investment.
Scope and limits
The site covers 200 years, 1900–2099, with one page per year, plus 12 animal pages, 78 pair pages, a year table, a Chinese New Year date table and this method page.
New Year dates come from lunar calendar calculation and are written to data/cny.json at build time. The animal, stem, branch, element and yin/yang are computed with integer modulo arithmetic and do not depend on the current date.
The content is for cultural reference. For BaZi charting, date selection or other professional uses, consult a qualified practitioner.