The FengSpark Journal

The Ten Gods Error Hiding in Most BaZi Software

If your Day Master is Yin — roughly half of everyone ever born — there is a fair chance your chart has been read through a flipped lens. Here is the bug we found in two independent engines, the classical rule that settles it, and the 100-pair proof.

← All writings
BaZiTen GodsAccuracyEngine RoomThe FengSpark Study02 Jul 2026

Ask any serious BaZi practitioner what the pillars of a chart are, and they will tell you the pillars are only the skeleton. The flesh — the part that actually says something about career, marriage, wealth and temperament — is the Ten Gods (十神): the ten relationships every other stem in your chart holds toward your Day Master.

Get the pillars right and the Ten Gods wrong, and you have a beautifully typeset horoscope of somebody who does not exist.

While preparing FengSpark's free BaZi tool, we ran a routine sanity check on a test chart — and the Ten Gods failed it. What followed was an audit of two independent calculation engines. Both were wrong. Differently.

The rule the classics actually state

The 子平 (Zi Ping) tradition defines the Ten Gods with a symmetry so clean it fits in five lines. For any stem measured against the Day Master:

Relationship Same polarity Different polarity
Same element 比肩 Friend 劫財 Rob Wealth
Day Master produces it 食神 Eating God 傷官 Hurting Officer
It produces the Day Master 偏印 Indirect Seal 正印 Direct Seal
Day Master controls it 偏財 Indirect Wealth 正財 Direct Wealth
It controls the Day Master 七殺 Seven Killings 正官 Direct Officer

Notice the pattern: same polarity always yields the 偏 (indirect) god; different polarity always yields the 正 (direct) god. That is the whole rule. It does not bend for Yin Day Masters. It does not bend for anyone.

The textbook anchor every student learns: for a 丁 (Yin Fire) Day Master, 甲 is 正印, 乙 is 偏印, 癸 is 七殺 — and 壬 is 正官, which is precisely why 丁壬 is celebrated as the noble officer combination. If a calculator tells a 丁 Day Master that 壬 is their Seven Killings, the calculator is wrong. Not "a different school." Wrong.

The two bugs we found

Engine one had the relationship categories rotated around the wheel — "the other stem produces me" was labelled as Output when it is classically a Seal, and the polarity test read the wrong flag entirely. Every category except the Companions was mislabelled.

Engine two was subtler, and far more common in the wild: its categories and its polarity logic were correct, but its lookup table carried a second half "for Yin Day Masters" — with 偏 and 正 inverted. Someone, somewhere, once believed a Yin Day Master flips the mapping. The classics contain no such doctrine. The result: every person with a Yin Day Master — 乙, 丁, 己, 辛, 癸 — received systematically inverted readings. That is roughly half of everyone ever born.

Think about what an inversion does in practice. 正官, the Direct Officer, speaks of legitimate authority, structure, a suitable husband in traditional reading. 七殺, Seven Killings, speaks of pressure, rivalry, power seized rather than granted. Flip them, and a chart counselling patient institutional progress starts recommending aggressive conquest — to exactly the wrong person.

The proof

We rewrote both engines to the classical rule, then made them argue with each other: all 100 pairings — every one of the ten Day Masters against every one of the ten stems — computed independently by both engines and compared, with hand-derived tables for a Yang Day Master (庚) and a Yin Day Master (丁) as the referee. Agreement: 100 of 100. The comparison now lives permanently in our test suite, so the error cannot quietly return.

What you can do with this

If you have ever had a BaZi reading — especially software-generated — and your Day Master is Yin, it is worth casting again on an engine you can hold to a standard. Ours is free, states its method on the page, and admits its limitations (solar-term month boundaries carry a one-day approximation at the cusp; a birth within a day of a term deserves a master's confirmation).

Cast your Four Pillars at /tools/bazi. If another tool disagrees with a Yin Day Master's gods — now you know which question to ask it.