How it works

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

StemPinyinElementPolarity
甲jiǎWoodYang
乙yǐWoodYin
丙bǐngFireYang
丁dīngFireYin
戊wùEarthYang
己jǐEarthYin
庚gēngMetalYang
辛xīnMetalYin
壬rénWaterYang
癸guǐWaterYin

The twelve earthly branches

BranchAnimalElementHourDirection
子 zǐ鼠 RatWater23:00–01:00North
丑 chǒu牛 OxEarth01:00–03:00North-northeast
寅 yín虎 TigerWood03:00–05:00East-northeast
卯 mǎo兔 RabbitWood05:00–07:00East
辰 chén龙 DragonEarth07:00–09:00East-southeast
巳 sì蛇 SnakeFire09:00–11:00South-southeast
午 wǔ马 HorseFire11:00–13:00South
未 wèi羊 GoatEarth13:00–15:00South-southwest
申 shēn猴 MonkeyMetal15:00–17:00West-southwest
酉 yǒu鸡 RoosterMetal17:00–19:00West
戌 xū狗 DogEarth19:00–21:00West-northwest
亥 hài猪 PigWater21:00–23:00North-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.

ConventionBoundaryCommon useThis site
Chinese New YearLunar 1/1Folk zodiac, year lookupUsed
Start of SpringFebruary 3–5Four 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.