Charting conventions
First, calculate clearly.
先算清楚,再慢慢说。
A BaZi chart can be calculated consistently once its conventions are fixed. Not every school makes the same choices, so we state ours plainly. Xuanyuan interprets this structured chart; it does not alter its facts.
What we use — and what we never ask for
A chart is a function of four things: your birth date, your clock time, your birthplace (which gives us a time zone and a longitude), and sex, which sets the direction of the luck cycles. That is the entire input.
We do not ask for your name, and nothing in the reading is inferred from anything other than those values. Two people who enter the same four things get the same chart.
True solar time, in three steps
Clock time is a political convention; a chart wants the sun. We convert in three steps. First, your wall-clock time is resolved against the IANA time zone for your birthplace — including historical daylight-saving rules, which the system time-zone database supplies. Second, we shift by longitude at four minutes per degree to get local mean solar time. Third, we add the equation of time, the annual wobble between mean and apparent solar time, using the NOAA approximation (accurate to well under a minute).
Your chart displays the total correction applied. It is not cosmetic: a birth in western China recorded on Beijing time can move by more than an hour, which is enough to cross into a different two-hour branch and change the hour pillar outright.
One honest caveat. If the corrected time lands within a minute or so of a branch boundary, treat the hour pillar as uncertain rather than exact — a recorded birth time is rarely precise to the minute anyway.
The correction is shown broken into its three parts — daylight saving, longitude against the zone's standard meridian, and the equation of time — because a single number asks you to take our word for it. The three add up to the total exactly, so you can check the arithmetic yourself.
How we resolve a birthplace
Typing a place name searches an offline dataset of about seventy thousand cities and towns held on our own server — roughly every settlement above five thousand people. Your birthplace is never sent to a third-party geocoding service: it is the one field that, combined with a birth date, can identify a person, and we would rather it not leave the box. Each entry carries its own IANA time zone, so one lookup gives us both the longitude and the zone the correction needs.
One judgement call is worth naming. Xinjiang is assigned UTC+6 geographically, but the whole of mainland China runs on Beijing time and birth records there are written in it, so we treat a Xinjiang birthplace as UTC+8 and say so on the form. Taking the geographic zone at face value would silently lose two hours — more than a full branch. If your own record was kept in local Ürümqi time, the form tells you to add two hours first.
Place data comes from GeoNames (CC BY 4.0); Chinese place names are normalised to simplified characters with OpenCC's character table (Apache-2.0).
Where the month and year actually roll over
The month pillar follows the twenty-four solar terms, not lunar-month labels and not calendar months. The month turns at the jie (节), the sectional term — not at the new moon.
The year pillar rolls at 立春, the beginning of spring, around February 4. Not January 1, and — this surprises people — not Chinese New Year either. Someone born on January 20, or on February 1, almost always belongs to the previous year's pillar. The crossing is computed astronomically, to the minute: born on the day of 立春 itself, your year pillar belongs to the old year or the new one by whether your moment of birth falls before or after the exact crossing — not by the date.
This is the single most common reason two calculators hand you different charts. If another site disagrees with us about your year pillar and you were born in late January or early February, this is why.
The late Zi hour
The branch 子 runs from 23:00 to 01:00, straddling midnight, so the hour between 23:00 and 24:00 has to be assigned by convention. We use the same-day convention (sect 2): the day pillar stays with the day you were born on — the day breaks at midnight, as the civil calendar does. The hour pillar takes its stem from the next day's day stem, which both conventions agree on. The other school changes the day pillar at 23:00.
Other schools roll it forward to the next day. Both are long-standing and defensible; there is no arithmetic that settles it. If you were born in that hour, your chart genuinely differs between schools, and you should know that rather than discover it later.
Luck cycles
Direction — forward or reverse through the sexagenary sequence — is set by the polarity (yin or yang) of the year stem together with sex. This is the traditional charting convention, and it is a statement about the calculation, not about identity.
The starting age comes from the distance between your birth moment and the adjacent solar term, converted at the customary ratio of three days to one year and rounded to the two-hour unit, so the start date lands on a ten-day boundary. Some tools convert by the minute instead; conventions differ, and we take the one that can be reproduced by hand. We show nine cycles, each with ten annual years inside it.
Five Elements scoring — the actual numbers
Element balance is a heuristic, so rather than call it one, here are the weights we use.
Each heavenly stem scores 1.0. Each branch is decomposed into its hidden stems and weighted 0.6 / 0.3 / 0.1 for primary, middle, and residual qi. The month branch is then multiplied by 1.5, which is how we give weight to 月令 — the commanding influence of the season you were born into.
Seasonal state (旺 / 相 / 休 / 囚 / 死) compares the month branch's element against your Day Master. Strength is the combined share of your Day Master's own element and its resource element: at or above 0.42 of the total we call the chart 偏强, on the strong side; that threshold drops to 0.36 when the Day Master is already in season. Anything else is 偏弱.
Favourable elements use the simplified support-and-restrain method (扶抑). When the Day Master is weak, we favour the resource and self elements. When it is strong, we take the two weakest among the elements that control it, that it controls, and that it produces.
Unfavourable elements mirror the same rule: a strong Day Master is advised against more resource and self; a weak one against the two strongest of the draining elements. And because the verdict is a threshold on a ratio, we also state how far your chart sits from that threshold. Within about one middle-qi hidden stem's worth of the total (0.03) the call is labelled low-confidence, and the reading is required to keep its hedges; beyond roughly half a stem (0.08) it is labelled high. A borderline chart is described as borderline, not rounded up to certainty.
These are conventions with numbers attached, not laws of nature. A practitioner weighting combinations, clashes, or root strength differently will reach a different verdict, and that disagreement is normal in this tradition rather than a sign that one of you is broken.
Combinations, clashes, and the lines we refuse to draw
What practitioners actually argue over is rarely a single character; it is how the eight of them sit together. So alongside each pillar's own hidden stems and Ten Gods, we compute the relations across the whole chart — the six clashes (六冲), six combinations (六合), six harms (六害), triple and half combinations (三合 / 半合), directional trines (三会), the punishments (三刑, 相刑, 自刑), and stem combinations (天干五合) — each listed with the pillars involved and how far apart they sit.
That column reports lookups, never verdicts. Whether a combination transforms, whether a clash is neutralised by a combination beside it, how heavily a punishment weighs — all of it varies by school, and writing one answer into code decides on the tradition's behalf. We say only that these two branches appear in the six-combination table. The reading is yours.
Four places where we deliberately list less than other calculators do. A half combination counts only when the pair includes the cardinal branch (子午卯酉), so pairs like 申辰 do not qualify. A triple punishment requires all three branches; the two-branch "half punishment" is contested enough that we omit it. 子卯 stands on its own as 相刑 rather than being folded in with the triples. And among stems we record only the five combinations — stem clashes are used too inconsistently to assert.
Two more relations fall out of the same pass. Rooting (通根): a stem is rooted wherever its element appears among a branch's hidden stems — matched by element, not polarity. Revealing (透干): a branch's hidden stem also stands openly as a stem in the chart — matched by character, not element. They are one line read from either end.
The month command (月令) stops halfway on purpose. We give the Ten God of each hidden stem and the number of days between the sectional term and your birth. We do not divide the month among those stems by day count: the tables that do disagree with one another — the 寅 month alone is split 7/7/16 by some and 5/9/16 by others — and the choice rewrites which Ten God dominates. Like the late Zi hour, that is a convention rather than a fact, so we hand you the day count and let you apply whichever table you hold to.
There is a reason for this past completeness. Xuanyuan may cite only facts the calculation produced, so a relation we never computed is one it would have to infer on its own. Working them out in advance closes a gap rather than adding a feature.
The current cycle and the year, joined to the chart
A reading has to talk about "this year" and "the cycle you are in", so both are computed the same way the natal relations are. The current luck-cycle pillar and the annual pillar each enter the chart as a temporary fifth pillar and run through the very same relation tables above — clashes, combinations, punishments — together with their Ten Gods against the Day Master, the Day Master's Twelve-Stage position on that branch, and whether the annual branch falls into the day pillar's Emptiness. The rule does not change at the boundary: lookups, never verdicts. Compound judgements like "the cycle and year doubling up" are school-dependent readings, and we leave them to the reader.
Which cycle counts as current follows from the start date derived above, matched at year granularity. When the target year falls outside the nine listed cycles — a chart cast for someone very young, or for a historical birth — the reading is told so explicitly rather than a cycle being invented.
With an unknown birth hour this runs across all twelve candidate charts and keeps only what holds in every one of them; relations that hinge on the hour pillar are reported as a count, not a guess. And when the start date floats across a year boundary so that the target year straddles two cycles, the reading says it cannot tell which cycle applies — instead of picking one.
What else is computed
Hidden stems, the Ten Gods, Na Yin, Tai Yuan, Ming Gong, Shen Sha, the Twelve Stages, and Emptiness are all derived from the same four pillars through fixed lookup tables. Nothing there is generated or estimated.
Two conventions there deserve to be declared. The Twelve Stages — the row most chart apps label 星运, plus the self-seat reading of each pillar — follow the traditional rule of yang forward, yin reverse: a yang stem walks the twelve branches forward from its Birth position, a yin stem walks them backwards. Schools that run only yang stems, or score by element rather than stem, will disagree with us on yin-stem pillars, and neither side can settle it by arithmetic. Emptiness (空亡) is read per pillar from that pillar's own ten-day cycle; when we say a branch "falls empty", it is measured against the day pillar's pair.
What the AI does — and cannot do
Everything above is arithmetic, and it happens before any language model is involved. Xuanyuan receives the finished chart as fixed facts and writes about it.
It cannot change a pillar, a score, a seasonal state, or a strength verdict. What it can do is be wrong in the way generated prose is sometimes wrong — too general, too confident, occasionally off-key. Trust the structure more than the sentences, and treat the reading as a prompt for reflection rather than a finding.
Reproducibility and known limits
There is no randomness anywhere in the calculation. The same birth details produce a byte-identical chart every time, and you are welcome to check any pillar against a 万年历 or any other calculator that declares the same conventions.
The limits worth naming: an unknown birth time makes the hour pillar unreliable, and it is better treated as absent than guessed. Time zones before standardization are approximations. Solar time means less at very high latitudes. And none of this is medical, legal, or financial advice.
Ready to see it applied? Cast your chart — it is free and needs no account. For background, read what BaZi is and the Five Elements. Practical questions — unknown birth times, accuracy, what this is not for — are answered in the FAQ.