Home / How Our Calculators Work

How our calculators work

The problem with most fortune-telling tools online isn't accuracy — it's that you have no idea what they actually did. This page publishes every rule we use, where the data comes from, and where it stops. Results depend only on what you type in: there is no randomness anywhere. The same input always gives the same output, on any device, any day.

Contents

  1. The Four Pillars (BaZi)
  2. Lunar calendar and solar terms
  3. Jianchu twelve gods
  4. Wealth and Joy directions
  5. Kua number
  6. Flying Stars (annual)
  7. Peach Blossom
  8. Wealth star (Ten Gods)
  9. Lucky colours
  10. Annual fortune and daily luck
  11. Name analysis (Wu Ge)
  12. BaZi compatibility

1. The Four Pillars (BaZi)

Each pillar — year, month, day, hour — is one heavenly stem paired with one earthly branch. All four switch on different boundaries, which is exactly where most calculators go wrong.

Year pillar: split at Li Chun, not at Chinese New Year

The year pillar changes at Li Chun (Start of Spring, around 4 February). In 2026 Li Chun falls on 4 February, so someone born on 3 February still belongs to the previous year (Yi-Si), and 4 February onward is Bing-Wu. Cutting the year at 1 January or at Chinese New Year shifts a whole year for anyone born before Li Chun.

Month pillar: split at the twelve "Jie", not at the 1st of the month

Month boundaries are the twelve major solar terms — Li Chun, Jing Zhe, Qing Ming, Li Xia, Mang Zhong, Xiao Shu, Li Qiu, Bai Lu, Han Lu, Li Dong, Da Xue, Xiao Han. Not the first day of the calendar month, and not the mid-terms. The month branch comes from the term; the month stem is derived from the year stem by the standard Wu Hu Dun rule.

Day pillar: computed from the Julian Day Number

No lookup table, no iteration. The day pillar comes straight from the JDN:

a = (14 − m) / 12 (integer division) yy = y + 4800 − a mm = m + 12a − 3 JDN = d + (153·mm + 2) / 5 + 365·yy + ⌊yy/4⌋ − ⌊yy/100⌋ + ⌊yy/400⌋ − 32045 index = (JDN − 11) mod 60 stem = index mod 10 branch = index mod 12

Valid across 1900–2099 with no calendar data needed, and leap years take care of themselves.

Hour pillar: early Zi, no day rollover

23:00–00:59 counts as Zi hour of the same day — we use the early-Zi convention, so the date does not roll over at midnight during Zi. The hour branch is fixed by the two-hour slot; the hour stem is derived from the day stem by the Wu Shu Dun rule. If you don't know your birth hour, the first three pillars are unaffected.

Solar term precision: our term table stores the crossing hour rounded up. If Li Chun lands at 07:53, the table records hour 8. Storing only the truncated hour would treat 07:53 as already crossed. It only shows up for births on the exact day of a term — but when it does, the whole year pillar is off by one.
How we verified it: our engine was compared against the reference Python implementation lunar_python across 1900–2099 — 198 years × 12 months × 28 days × 12 hour-slots, 798,336 samples — with zero differences. Front-end and back-end implementations were separately cross-checked on 84,000 samples, also zero differences.

2. Lunar calendar and solar terms

Lunar conversion covers 1900–2099. Month lengths and leap months are stored in a compact integer table (low bits carry the leap month, the rest a bitmap of long and short months); a leap month follows the month of the same number.

Your Chinese zodiac animal is set by the lunar year, which changes at Chinese New Year — not on 1 January. Someone born on 20 January 1990 is a Snake; born 5 February 1990, a Horse. Two weeks apart, different animals.

3. Jianchu twelve gods and daily do's and don'ts

The "auspicious / inauspicious" lists you see on a Chinese almanac aren't arbitrary. We use the Jianchu system: the day's presiding god comes from the relationship between the month branch and the day branch.

k = (day branch − month branch + 12) mod 12

k indexes the twelve gods in order — Jian, Chu, Man, Ping, Ding, Zhi, Po, Wei, Cheng, Shou, Kai, Bi — and each carries a fixed pair of suitable and unsuitable activities:

GodSuitableAvoid
JianTravel, take office, pray, seek offspringGroundbreaking, well digging, boating
ChuCleaning, medical treatment, travelSeeking money, opening business
ManRituals, prayer, opening, contractsMedicine, planting
PingRepairs, road work, marriageDigging channels, planting
DingRituals, agreements, engagement, buildingLawsuits, travel
ZhiCapturing, building, marriageOpening, travel, relocation
PoDemolition, medical treatmentMarriage, opening, groundbreaking
WeiBed placement, ritualsHeights, boating, travel
ChengMarriage, opening, schooling, building, tradeLawsuits, disputes
ShouCollecting payment, capturing, adding membersOpening, travel, burial
KaiPrayer, opening, schooling, buildingBurial, water release
BiBurial, grave repair, embankmentOpening, travel, medical treatment
Almanacs disagree — different schools use different rule sets, and the same day can be marked differently across them. We publish the Jianchu table we use so you can reproduce our output yourself rather than taking our word for it.

4. Wealth and Joy directions

Both are looked up from the day's heavenly stem only. Your zodiac sign and birth hour don't enter into it.

Day stemWealth (Cai Shen)Joy (Xi Shen)
JiaNortheastNortheast
YiNortheastNorthwest
BingWestSouthwest
DingWestSouth
WuNorthSoutheast
JiNorthNortheast
GengEastNorthwest
XinEastSouthwest
RenSouthSouth
GuiSouthSoutheast

5. Kua number (East / West group)

The Kua number drives Eight Mansions feng shui. The year used is the Li Chun year — before Li Chun, use the previous year:

1. Add the digits of the year repeatedly until you get a single digit s (1–9) 2. Male: k = 11 − s Female: k = s + 4 3. If k > 9, subtract 9 repeatedly until it lands in 1–9 4. Male 5 becomes 2 (Kun); female 5 becomes 8 (Gen) k ∈ {1, 3, 4, 9} → East group otherwise → West group

The eight directional ratings follow from the trigram's fixed star distribution: Fu Wei, Sheng Qi, Yan Nian and Tian Yi are favourable; Wu Gui, Jue Ming, Huo Hai and Liu Sha are unfavourable.

6. Flying Stars (annual)

The star that occupies the centre palace for a given year:

n = (11 − (year mod 9)) mod 9 if n ≤ 0, add 9

From there the stars fly through the nine palaces along the Lo Shu path, giving each direction its annual reading. This is the annual cycle only — it does not include monthly stars or a full mountain-water flying star chart.

7. Peach Blossom (romance direction)

Derived from the three-harmony branch groups, computed once for the year branch and once for the day branch:

Harmony groupPeach Blossom branchDirection
Shen · Zi · Chen (Water)YouWest
Yin · Wu · Xu (Fire)MaoEast
Si · You · Chou (Metal)WuSouth
Hai · Mao · Wei (Wood)ZiNorth

When the year branch and day branch point to the same direction the signal is concentrated; when they differ, outside opportunity and inner preference are pulling different ways.

8. Wealth star (Ten Gods)

In the Ten Gods framework, "wealth" is the element the Day Master controls. Whether that wealth helps you depends on whether you can carry it:

Combined with how often the wealth element appears in the chart, this gives four readings: strong with abundant wealth (pursue income actively, scale up), strong with thin wealth (open new channels rather than waiting), weak with abundant wealth (consolidate first, avoid leverage), weak with thin wealth (hold the main line and control spending).

9. Lucky colours and directions

We reuse the same strong/weak test, then pick the element to favour:

That element then maps to a colour family, a direction and set of numbers. This is an element-level steer; we don't tell you which object to buy.

10. Annual fortune and daily luck

Annual reading

We build the chart for today and compare your day branch against today's year branch and day branch. The relationship comes back as one of: same branch, six-harmony, three-harmony, six-clash, six-harm, punishment, self-punishment, or neutral. Harmony favours agreements and partnership; clash signals movement and change; harm tends to bite in details and communication; punishment flares around rules and arguments.

Daily luck

Your animal is fixed by the lunar year. The daily tier is then built from two real rules, and the page prints the arithmetic:

score = 70 + 6 × relationship points + 4 × Jianchu points (clamped to 45–98) Relationship: three-harmony / six-harmony +2, same +1, neutral 0, six-harm / punishment / self-punishment −1, six-clash −2 Jianchu: Cheng, Kai +2; Man, Ding, Shou +1; Jian, Chu, Ping 0; Wei, Bi −1; Po, Zhi −2 ≥ 88 excellent ≥ 75 good ≥ 60 steady below that, weak

Those weights are ours — they are not handed down in any classic. That's exactly why they're printed on the page: you can decide whether you agree with them.

11. Name analysis (Wu Ge)

The Five Patterns method counts Kangxi strokes, not simplified-form strokes. Where the numbers come from:

Wu Ge is a modern name-analysis method that came into Chinese practice via Japan — it is not part of the classical Chinese systems of destiny calculation. It's a scoring system with fixed rules, not a verdict. We compute it by the published rules and publish them back.

12. BaZi compatibility

Three layers, weighted in order:

The three combine into a 0–100 score with a written reading. The score describes how the two charts sit together inside a traditional framework; it does not predict whether a marriage works.

Anchors you can verify

Check these against any reference tool you trust. If they don't match, we're the ones who are wrong — tell us.

Date · timeFour PillarsLunar date
1949-10-01 · 15:00Ji-Chou · Gui-You · Jia-Zi · Ren-Shen8th month, day 10
2000-01-01 · 12:00Ji-Mao · Bing-Zi · Wu-Wu · Wu-Wu11th month, day 25
2024-02-10 · 12:00Jia-Chen · Bing-Yin · Jia-Chen · Geng-Wu1st month, day 1
2025-01-29 · 12:00Jia-Chen · Ding-Chou · Wu-Xu · Wu-Wu1st month, day 1
2026-02-17 · 12:00Bing-Wu · Geng-Yin · Ren-Xu · Bing-Wu1st month, day 1

Limits, and what we don't do

FAQ

Why does the year start at Li Chun instead of Chinese New Year?

BaZi uses the sexagenary (stem-branch) calendar, whose year begins at Start of Spring. Chinese New Year is the first day of the first lunar month — a lunisolar calendar. The two year boundaries are simply different, and BaZi follows Li Chun. It's also the single most common source of charting errors.

I don't know my birth hour. Can I still get a chart?

Yes. The hour only sets the hour pillar; year, month and day are unaffected — and the day pillar, which represents you and your spouse, is the most important of the four. We default the hour and the reading leans toward overall tendency.

Other sites give me a different chart. Which is right?

Test them against the anchor table above. Most disagreements come from three places: cutting the year at Chinese New Year, cutting the month at mid-terms instead of major terms, and truncating the solar-term crossing to the hour. We follow the sexagenary rules and round the crossing hour up.

Where do the scores come from?

Compatibility, daily luck and name scores are scoring tables we defined from traditional rules — they are not fixed verdicts handed down in classical texts. The weights are published on this page so you can decide whether you accept them. We'd rather be checkable than look authoritative.

If this is just for fun, why bother being rigorous?

Because "roughly computed" and "computed by stated rules" give you completely different things. With the first you can only believe it or not. With the second you can check it, argue with it, and compare it against what a human practitioner tells you.

Want these readings applied to your actual floor plan and schedule? Bring your chart and ask a practitioner.

Book a Consultation