Bazi · Four Pillars of Destiny · Specification v1.6

How this calculator computes a bazi chart

Most bazi calculators hand you a verdict and hide the arithmetic. This page is the opposite: the complete, versioned specification of exactly how Jade Almanac turns a birth date into four pillars, a day-master strength, favorable elements, and a year-by-year life chart. Every formula, weight, and threshold the engine uses is written out below, then worked end to end on a real, public chart. The point is that you can cite it, audit it, or disagree with a specific choice — not take the output on faith.

One honest frame before any of it: this is one school's simplified reading. It follows the strengthen-and-balance (扶抑) approach with a standard modern scoring simplification. A pattern-school (geju) or blind-school (mangpai) practitioner would weigh the same chart differently, and a near-follower chart can flip the whole reading. Where that matters, this page marks it. This is cultural interpretation offered as insight and entertainment, never prediction, and never a basis for medical, legal, or financial decisions.

Specification version
v1.6
Last updated
July 26, 2026
School
Fuyi (strengthen / balance), modern position-weight simplification
Chart engine
tyme4ts (year turns at Li Chun; solar-term month pillars)

Inputs and conventions

The calculator takes a birth date (required), a sex (required — it sets the direction the luck pillars run, a rule of the system, not a product choice), and a birth time (optional). Four fixed conventions govern everything downstream:

  • The year turns at Li Chun (立春, around February 4), not at Chinese New Year. Bazi is a solar system: the month pillars are keyed to the 24 solar terms too. A birthday in late January or early February can therefore sit in a different year pillar than the popular zodiac would suggest. (why the year begins here.)
  • True solar time, when you give us a birth city. Hour pillars are keyed to the sun, not to a clock, and three layers sit between them: the time-zone offset in force that day, the gap between your longitude and your zone's meridian, and the equation of time — the visible sun itself running up to about 16 minutes fast or slow of a uniform clock across the year, as Earth's tilted, elliptical orbit plays out. Given a city we undo all three, which also removes daylight saving without asking you to remember whether it applied; and if your recorded time falls in a daylight-saving seam — an hour that ran twice, or one that never ran — the result says so instead of silently picking a reading. Without a city we read the clock literally and say so. Either way, a time that lands within about 45 minutes of a two-hour pillar boundary is flagged: birth records round minutes, and near a boundary that rounding can move the pillar. We measured how eight other implementations handle this and the three other conventions that move a chart: why bazi calculators disagree.
  • No birth time → an honest three-pillar chart. The year, month, and day pillars do not depend on the hour, so they are computed exactly; the hour pillar is dropped rather than guessed, and the strength test renormalizes to five positions (base 76) instead of seven (base 100).
  • Nothing entered is stored. The chart is computed and shared by URL only; there is no account and no server-side record.

Step 1 · The four pillars

Each pillar is one heavenly stem over one earthly branch. The year pillar comes from the Li-Chun-bounded year; the month pillar from the solar term, its stem fixed by the year stem (the wuhudun, Five Tigers rule); the day pillar from the continuous sexagenary day count; the hour pillar, when a time is given, from the day stem (the wushudun, Five Rats rule). Each branch also carries one to three hidden stems — the elements buried inside it — which the strength test in Step 2 reads. This derivation is handled by the tyme4ts library and is not where any interpretation happens yet.

Step 2 · Day-master strength

The day master is the day pillar's stem — the one character read as you. Everything else is scored by whether it supports that character. The test comes from Wei Qianli's 1935 Qianli Minggao: does the day master get seasonal support, does it root in the branches, do other stems stand with it? We quantify those three factors with the position weights standardized in modern teaching — the month branch counting heaviest, because season is the classical test's single biggest factor:

Position Weight Classical factor
Year stem 8 Stem support (de shi)
Year branch 4 Rooting (de di)
Month stem 12 Stem support (de shi)
Month branch 40 Seasonal timing (de ling)
Day branch 12 Rooting (de di)
Hour stem * 12 Stem support (de shi)
Hour branch * 12 Rooting (de di)
Total 100 / 76 four-pillar / three-pillar base

* Hour stem and branch count only when a birth time is given; without it the base is 76.

A position counts as support when its element is the day master's own element (a Companion) or the element that generates it (a Resource). A stem contributes its full weight; a branch contributes its weight scaled by the strength share of each supporting hidden stem. Those shares follow Zhu Zuxia's 1999 lineage over the standard Yuanhai Ziping hidden-stem table:

Branch Hidden stems (element · share)
Zi (Rat) Gui (Water) 1.0
Chou (Ox) Ji (Earth) 0.6 · Gui (Water) 0.3 · Xin (Metal) 0.1
Yin (Tiger) Jia (Wood) 0.6 · Bing (Fire) 0.3 · Wu (Earth) 0.1
Mao (Rabbit) Yi (Wood) 1.0
Chen (Dragon) Wu (Earth) 0.6 · Yi (Wood) 0.3 · Gui (Water) 0.1
Si (Snake) Bing (Fire) 0.6 · Wu (Earth) 0.3 · Geng (Metal) 0.1
Wu (Horse) Ding (Fire) 0.7 · Ji (Earth) 0.3
Wei (Goat) Ji (Earth) 0.6 · Ding (Fire) 0.3 · Yi (Wood) 0.1
Shen (Monkey) Geng (Metal) 0.6 · Ren (Water) 0.3 · Wu (Earth) 0.1
You (Rooster) Xin (Metal) 1.0
Xu (Dog) Wu (Earth) 0.6 · Xin (Metal) 0.3 · Ding (Fire) 0.1
Hai (Pig) Ren (Water) 0.7 · Jia (Wood) 0.3

Add the supporting points, divide by the base. At or above 50% the chart reads strong; below 50%, weak. Between 40% and 60% it is treated as near-balanced: the reading still resolves to strong or weak, but every year's swing is damped to 60% of its size and the chart is flagged as a close call, because at that margin a stricter or looser practitioner could land on the other side.

Step 3 · Favorable elements

Strength is only an input. It flips a single rule from the Yuanhai Ziping: strengthen a weak day master, drain a strong one. That decides which of the five elements help this chart and which press on it — the switch every year score is then measured against.

If the chart is… Favorable elements Why
Weak Own element (Companion) + its generator (Resource) The day master wants company and feeding
Strong What it generates (Output), overcomes (Wealth), and what disciplines it (Influence) The day master has surplus to spend and needs draining

That two-way split names the elements. For scoring it is graded, because favorable is a matter of degree: for a weak day master, Resource feeds it more directly than Companion does, and Influence presses harder than Output drains. Each of the five relations therefore carries a signed weight from −1 to +1, ordered by how directly it adds to or draws off the day master — the same strengthen-and-balance rule, resolved finer.

Relation to the day master Weak chart Strong chart
Resource (yin)
generates the day master
+1.0 −1.0
Companion (bijie)
same element as the day master
+0.7 −0.75
Output (shishang)
the day master generates it
−0.5 +1.0
Wealth (cai)
the day master overcomes it
−0.8 +0.85
Influence (guansha)
it overcomes the day master
−1.0 +0.6

A branch is not one element but several, so a branch's affinity is its hidden stems' affinities weighted by the same strength shares used in the strength test:

branch affinity = Σ (hidden stem's share × that element's affinity)

The favorable elements are still weighted as a group rather than singling out one yongshen (governing favorable element); that refinement is noted as a known simplification.

Step 4 · Luck pillars (da yun)

Luck pillars are ten-year stretches that set the weather each year is scored against. Their direction — forward or backward through the sexagenary cycle — follows the classical rule of year-stem polarity crossed with sex, and the age they start is taken from the chart's decade-fortune count (a nominal xusui age). That starting count is itself a school choice — the calculation library we ride on ships four child-limit conventions that can disagree by a year of starting age — and we pin its default explicitly rather than inherit whatever the library happens to select. Each pillar is then scored by the same affinity rule as a year:

pillar offset = 8 × stem affinity + 10 × branch affinity
favorable pillar = offset ≥ +6 · unfavorable = offset ≤ −6 · between: near neutral

The branch weighs more than the stem here, which is why a decade takes on the character it does, and why the chart reads in ten-year chapters rather than as noise. That decade offset (from −18 to +18) is carried into every year that falls inside the pillar.

How the starting age is computed

The starting count is arithmetic, not a lookup, and it is the step most English calculators hide. Two rules fix it. Direction is the year stem crossed with sex: men born under a Yang year stem and women born under a Yin one walk forward through the sixty-pair cycle; men under a Yin stem and women under a Yang stem walk backward. Timing is the distance from the birth moment to the nearest month-opening solar term (节, jie: Lichun, Jingzhe, Qingming and the nine others that open a bazi month, never the mid-month terms). A forward chart counts to the next such term ahead; a backward chart counts back to the last one behind. The gap is then converted at the classical rate:

three days = one year · one day = four months · one double-hour (two hours) = ten days
first luck pillar opens at: birth + the converted gap, stated as a nominal (xusui) age

Worked on the same public chart. Elon Musk's year pillar is Xin-Hai, a Yin stem on a male chart, so it walks backward. From his birth (June 28, 1971, 12:00, noon assumed because the time is unpublished) the count runs back to Mangzhong (Grain in Ear) at June 6, 1971, 16:28: a gap of 21 days 19 hours 31 minutes. Divide by three: 21 days give 7 years, and the leftover 19 hours 31 minutes, at five days to the hour, become 3 months 7 days. The first pillar therefore opens 7 years 3 months 7 days after birth, in 1978, which the tradition states as nominal age 8: the Gui-Si decade, one step back from the Jia-Wu month pillar. That is the first row of every luck-pillar table on this site and the year the decade-by-decade walk starts from.

The same eight characters walk the other way on a female chart. A woman born that day carries identical pillars, but a Yin year stem with a female chart means forward: the count runs ahead to Xiaoshu (Minor Heat) at July 8, 1971, 02:51, a gap of only 9 days 14 hours 51 minutes, which converts to 3 years 2 months 14 days. Her luck pillars would open at nominal age 4, in 1974, with Yi-Wei, one step forward from the month pillar. Same birthday, a 4-year difference in when the decades turn, and every later decade shifted with it: this is why the calculator has to ask for sex before it can draw a timeline.

The four child-limit conventions named above differ only in how they round the leftover hours and minutes: a few days of difference in the opening moment, and for roughly two charts in a hundred a whole year of starting age. On this chart all four agree on age 8. Ages are nominal throughout, counted the traditional way, one at birth.

Step 5 · The yearly score

Each year gets one number — the close, the body of the candle on the chart. It starts at a neutral baseline of 50 and adds three swings: the decade context it sits in (weightiest, the classical rule that the decade outweighs the year), the year's own stem, and the year's own branch. If the chart is near-balanced, the whole swing is damped to 60%.

year stem = 6 × stem affinity
year branch = 8 × branch affinity  (all hidden stems, share-weighted)
decade = the luck-pillar offset above (0 before luck pillars start)
close = clamp(50 + (decade + year stem + year branch) × damp, 5, 95)
open = the previous year's close

Because the affinities are graded rather than yes/no, a year lands almost anywhere in the band instead of on one of a handful of rungs. That is deliberate: a binary gate gives a year two possible values, and a life drawn from two values per decade is a square wave, not a chart.

Step 6 · Events and stars

The year's branch is checked against each of the natal branches for the four classical branch relations. When one pair could be read more than one way, the stronger relation wins, in the order clash > punishment > harm > combination.

Relation Reading
Clash opposing branches — friction, movement, decisions forced into the open
Punishment friction of a subtler, self-entangling kind
Harm quiet undermining between two branches
Combination a binding pull — not always calm; a distraction as often as a help

Two day-branch-anchored stars are also marked when the year's branch matches: the peach blossom (咸池, romance and charm) and the travel horse (驿马, movement and relocation).

None of these move the score. They label a year. Through v1.0 the branch relations drove a candle wick, a high and a low sitting either side of the body — and it did more harm than good: the wick claimed vertical range the body needed, so the chart that was supposed to show which decades run high read as a flat row of crosses. A mechanism that costs the chart its main reading to add a second-order one is not worth keeping, so v1.1 draws bodies only and lets the relations speak in words.

The candle, defined: open = last year's close · close = the year's combined score. Green when the year closes above the last one, red when below. Borrowed from a candlestick chart so a life reads at a glance, but every candle opens to show the three components that built it.

Derived readings

The engine also reads a few summary facts. The peak is the decade the chart itself rates highest: the luck pillar with the largest affinity offset — the same number the decade verdicts read, so the peak and a decade's verdict can never disagree. When the top two pillars are level (inside the same ±6 band the verdicts use) and adjacent, they merge into one twenty-year peak — ten years or twenty, never more — and a tie prefers the stretch still ahead. The rest are plain arithmetic on the series: a golden run is consecutive favorable decades merged into one long stretch; the best and hardest past years (adult years only) are the series' high and low behind you — the checkable, backtestable claims; and the next turn is the next decade pillar whose tone — favorable, unfavorable, or near neutral — differs from the current one; cooling to neutral counts, because that is a change of weather the reader feels even without a sign flip. Nothing here is a separate model; it is all the same casting, read.

One reading is deliberately not score-derived: the window the chart stamps, and the answer headline above it. Those follow the current ten-god run: consecutive luck pillars whose branch main-qi bears the same relation to the day master (the branch outweighs the stem in our own decade weights, 10 against 8, so one rule and no dual labels). A run is a fact of the casting, which means everyone has one; whether it runs with or against the chart is an adjective from the affinity table, never a gate. The score-derived facts above still drive the receipts and backtest sections.

Worked end to end: a real, public chart

Elon Musk, born June 28, 1971. Birth time unpublished, so this is an honest three-pillar chart — the same one used elsewhere on this site, and computed live by the same engine for the figures here.

  1. Day master: Jia Wood — a Yang Wood day master.
  2. Strength: 19.6 of 76 supporting points = 25.8%, under the 50% line, so the chart reads weak. The heaviest single position — the month branch at 40 — contributes nothing here, and one correctly weighted position outvotes the rest.
  3. Favorable elements: a weak Wood day master wants company and feeding, so the favorable elements are Wood and Water.
  4. A scored year — 2018: a year stem the affinity table grades at -4.8 (of a possible ±6), a branch at -6.6 (of ±8), inside a decade tilted -9.2 (of ±18):

close = 50 − 9.2 decade − 4.8 stem − 6.6 branch = 29.4

29.4 is the lowest year on Musk's chart — and 2018 is the year he has publicly called the most painful of his career. Same three numbers, added in the open, landing on the year he names himself. For contrast, the chart's peak decade computes to 1988–1997: his student years and first startup, not the SpaceX and Tesla decades — the method is willing to disagree with the résumé. None of this is tuned after the fact; it is the specification above, run forward.

Honest limits and known disagreements

The specification is deterministic, but it is not the only valid one, and it is not science. Three limits are worth stating plainly:

  • One school. This is the strengthen-and-balance approach with a modern scoring simplification. Pattern-school and blind-school readers weigh the same chart differently and would sometimes reach the opposite conclusion.
  • Near-follower charts. When support is very low, a chart can cross from "weak" into a follower (从) pattern, where the favorable elements invert. Musk's chart, at roughly a quarter support, sits near that line — a real example of where schools would part ways.
  • Known misses, recorded honestly. Backtesting against public lives, the decade-level reading lands well, but single years miss: Musk's 2021 (a peak public year) scores low on this method, and a follower-pattern reading would score it high. The chart is strongest at the ten-year scale and should be read that way.

These limits are checkable rather than merely declared. The published sample reading prints a whole report on one chart, dates and markers included, so the decade-scale claim can be held against a real life.

Changelog

  • v1.6 — September 12, 2026 — documentation only, no score changes: Step 4 now writes out how the luck-pillar starting age is computed (direction by year-stem polarity and sex, the count to the nearest month-opening solar term, three days to a year) and works it on the public chart in both directions, with the four rounding conventions named and the pinned one stated. Every figure in the worked example is computed from the engine's own child-limit, not retyped.
  • v1.5 — August 25, 2026 — the stamped window on your own result now always points forward: it is the peak while the peak is not yet spent, and the tallest decade still ahead once it is, named "your strongest years ahead" rather than the peak. The stamp also stays inside the drawn chart: a window lying wholly past the eightieth year is passed over the same way. Celebrity backtest cards keep their historical peaks, since checking the past is what a backtest is for, and the paid reading still gives the lived peak its full account. Scores and the peak definition itself are unchanged.
  • v1.4 — August 16, 2026 — one peak, one definition: the peak is now the luck pillar the affinity table rates highest, merged with its runner-up only when the two are level and adjacent — ten years or twenty, never more, with a tie preferring the stretch still ahead — replacing the highest-averaging rolling ten-year window, which landed off a pillar boundary for six readers in ten and could disagree with the decade verdicts. The paid reading, the celebrity charts, and this page now name the same window. Year scores, and the stamped window on your own result (your current ten-god run, per v1.3), are unchanged.
  • v1.3 — August 9, 2026 — the chart gained a real score scale: ticks every ten points, a faint grid, and a dashed baseline at 50, disclosing the per-chart normalization instead of hiding it. The stamped window and the answer headline now follow the current same-ten-god luck run (a fact of the casting) rather than the score-derived golden run, and default-visible copy on the result page carries no scores; the numbers live on the chart's scale, in the tap-open arithmetic, and on this page. The scores themselves are unchanged.
  • v1.2 — August 9, 2026 — the birth-city correction now includes the equation of time, completing true solar time in the apparent-sun sense (previously longitude and daylight saving only, and disclosed as such); clock readings that fall in a daylight-saving seam — an hour that ran twice, or never ran — are flagged instead of silently resolved; and the luck-pillar start convention is pinned explicitly. With a birth city given, hour pillars — and, near 23:00, day pillars — can differ from v1.1 for roughly six percent of charts; without one, nothing changes.
  • v1.1 — August 8, 2026 — favorable elements became a graded affinity (−1…+1 by ten-god relation) instead of a yes/no gate, and a branch is now scored across all its hidden stems rather than only its main one. Under v1.0 a year could take only a handful of values, which left the peak decade and best year decided by ties often enough to matter; the finer scale resolves them. The candle wick was removed with it: branch relations now label a year without moving its score. Readings computed under v1.0 will differ.
  • v1.0 — July 26, 2026 — first public specification: three-factor strength test, position-weight scoring, hidden-stem shares, favorable-element rule, luck-pillar and yearly scoring, event amplitudes, OHLC semantics.

Sources

  • • 韦千里《千里命稿》 (Wei Qianli, Qianli Minggao, 1935) — the three-factor strength test itself: seasonal timing (得令), rooting in the branches (得地), and support from other stems (得势): source
  • • 《渊海子平》 (Yuanhai Ziping, Song-dynasty compilation) — the strengthen-the-weak / drain-the-strong rule for favorable elements, and the standard hidden-stem and branch-relation tables: source
  • • Position-weight scoring, month branch heaviest at 40% — a standard modern teaching simplification: source
  • • Hidden-stem strength shares (single 1.0; two-stem 0.7/0.3; three-stem 0.6/0.3/0.1): source
  • • 朱祖夏《命理应用精解》(Zhu Zuxia, 1999) — the hidden-stem share lineage this scoring follows
  • • English-language walkthrough of the same strong/weak test, for cross-reference: source
  • • 万民英《三命通会》 (Wan Minying, Sanming Tonghui, Ming dynasty) — the luck-pillar rule: direction by year-stem polarity and sex, the count to the nearest month-opening term, three days to a year

Run it on your chart

Your bazi life chart

Enter a birth date and the specification above runs forward, scoring every year of your life.

The friendly version

What your day master means

The strength test again, one concept at a time, worked on the same chart.

The luck pillars, in depth

Luck pillars vs. zodiacal releasing

The decade-scoring step above, set beside the Greek timing system that maps the same peak years.

Stay in the loop.

Chinese mythology, the zodiac, and the meaning behind names and symbols, rooted in the classics and read back to you. No spam. Unsubscribe anytime.