Heavenly Stems and Earthly Branches: The 3,000-Year-Old Encoding System Under All Chinese Divination
Updated · 2026-07-27
China's history books name their events strangely: the Jiawu War (1894), the Wuxu Reform (1898), the Xinhai Revolution (1911). Those aren't places or people — they're timestamps: each event is named for its year's designation in a coding system China has run, without interruption, for more than three thousand years. Meet the Heavenly Stems and Earthly Branches — ganzhi.
Without ganzhi, nothing else in Chinese metaphysics parses: BaZi, the almanac, I Ching casting, Qimen — the entire edifice stands on this encoding.
Two gears
Ganzhi combines two symbol sets:
- Ten Heavenly Stems — jia, yi, bing, ding, wu, ji, geng, xin, ren, gui: a base-10 gear.
- Twelve Earthly Branches — zi through hai: a base-12 gear, the same twelve positions the zodiac animals mascot.
Turn both gears together and the pattern repeats at their least common multiple: 60. Jiazi, yichou, bingyin… through guihai, then back to jiazi — the famous sexagenary cycle. It's why a 60th birthday is special in China (huajia, "return of the cycle"): you have lived one complete revolution of your own timestamp.
In modern terms: ganzhi is modular arithmetic, base-10 × base-12 — the same mathematics as the seven-day week, with a longer period and far denser payload.
Four clocks at once
The system's real power: it stamps four time-scales simultaneously.
- Years carry a pair (2026 is bingwu) — your zodiac animal is just the year-branch's mascot.
- Months carry pairs, switching at solar terms.
- Days carry pairs — a 60-day wheel that has turned continuously for millennia. Historians use the unbroken day-count to verify dates in ancient records: ganzhi's hardest scholarly credential.
- Double-hours carry pairs — twelve two-hour periods per day.
At the moment of your birth, four clocks each point at a pair. Write the four pairs down and you have — eight characters. BaZi is literally the act of reading these four timestamps.
Every symbol carries attributes
If ganzhi were only an encoding, it would only be a calendar. What grew it into divination is the attribute layer: every stem and branch carries an element and a polarity — jia is yang wood, bing is yang fire — and each branch additionally hides one to three "concealed stems." Thus every instant of time automatically carries an elemental configuration: time itself has a personality. Fate-reading, almanac verdicts, and date election all rest on that single premise.
A party trick
Year conversion has a shortcut: the Western year's last digit maps to a stem (4 = jia, 5 = yi… 3 = gui), and the year mod 12 maps to a branch. The 1911 revolution: final digit 1 = xin; 1911 mod 12 = 3 = hai — Xinhai. Every named year in the history books is now something you can verify on a napkin.
The honest boundary
As ever: ganzhi is a real, precise, academically valuable calendrical code; the claim that each instant carries elemental attributes is a cultural stipulation, not a natural fact — timestamps have no demonstrated effect on lives. Admiring one of humanity's longest-running encoding systems and enjoying the divination games built on it are perfectly compatible. At ORACUL, readings are for entertainment and cultural reference only — not professional advice.
Curious what four pairs your birth moment stamps? Our BaZi page lays out your four pillars free — four timestamps and the elements they carry, on one screen.
Try it yourself
BaZi (China) →