Methodology: How KnowYourBaZi Casts a Chart and Picks Favorable Elements
Enter the same birthday on three BaZi sites and you will often get three different sets of favorable elements. Usually nobody has made a mistake. The difference lies in the school's settings and the rules for picking favorable elements: what time the day changes during the Zi hour, what ruler measures a strong or weak Day Master, whether climate should override support and restraint. Each choice can turn the conclusion. This page writes down every choice this site makes, so you can compare it with other sources or check the math yourself.
1. Chart Settings
The Four Pillars and the exact moments when solar terms change are calculated with the open-source calendar library lunar-javascript. Every calculation runs in your browser, and your birth date is never sent to a server. These are the settings that affect the result:
| Item | What this site does | Why, and what it affects |
|---|---|---|
| Year Pillar | The year changes at the Start of Spring (Lichun, 立春), not on Lunar New Year's Day | A BaZi year is a solar-term year. People born in late January or early February are the most likely to be off by a whole pillar because of this. |
| Month Pillar | Months are cut by the twelve "jie" (節) solar terms (Start of Spring, Awakening of Insects, Pure Brightness … Minor Cold) | These are not lunar months, and the "middle terms" (zhong qi, 中氣) are not used. If you were born on the day a term changes, the exact moment of the change decides. |
| Zi hour and the day change | The day changes at 23:00: for the "Late Zi hour," born 23:00–23:59, the Day Pillar is the next day's | Another school holds that the day only changes after midnight. The difference falls within that one hour after 23:00, but it swaps out the Day Master entirely. That is why the form's hour menu lists the Early Zi hour and the Late Zi hour separately. |
| Unknown birth hour | Only the Year, Month and Day Pillars are cast | Strength is still calculated, but the engine adds a note: "no Hour Pillar, for reference only." The Hour Pillar's stem carries a weight of 1 and its branch 1.5 (multiplied by the hidden-stem shares), so without it the score does skew. |
| True solar time | Optional: corrected only if you tick the box | Three corrections are applied: historical daylight saving time (from local time-zone records), the gap between the birthplace's longitude and the central meridian of its time zone, and the equation of time (error about ±0.5 minutes). It is off by default, because most people remember clock time, and schools already disagree on whether to correct at all. |
| Luck Pillars (da yun, 大運) | Males born in a yang year and females born in a yin year count forward; the others count backward. The starting age uses the traditional rule that three days count as one year (san ri zhe yi nian, 三日折一年) | Count from birth to the next (or previous) "jie" term, and every 3 days becomes 1 year. This is the most widely used method. Another method works it out to the minute, and the two can differ by a few months. |
| Northern and Southern Hemispheres | For now, climate is always judged by Northern Hemisphere seasons | Southern Hemisphere seasons are the reverse of the north. The engine can already flip the whole cold/warm judgment, but the chart page does not offer the switch yet. The Four Pillars themselves are not affected. |
2. How Strong or Weak Is Calculated
The classics judge strength with a few tests: being in season (de ling, 得令), being rooted (de di, 得地) and having backing in numbers (de shi, 得勢). But they give no numbers. This site turns them into a weighted score. The benefit is that every chart's judgment can be reproduced and checked. The cost, and this needs saying first: the weights are this site's own, not taken from the classics.
Here is how it works. Every heavenly stem on the chart other than the Day Master, and every hidden stem in the branches, is sorted into one of five groups by its relation to the Day Master: Resource (generates me), Peers (same element as me), Output (I generate it), Wealth (I control it) and Authority (controls me). Each is then weighted by its position and added up.
| Position | Weight | Notes |
|---|---|---|
| Month branch | 3.0 | The month command carries the most weight. Being "in season" is decided mainly here |
| Day branch | 2.0 | What the Day Master sits on, the closest position |
| Year and Hour branches | 1.5 each | Farther from the Day Master |
| Year, Month and Hour stems | 1.0 each | The day stem itself is not counted: it is the one being helped or attacked |
| Hidden stems in branches | Main qi 1.0 / middle qi 0.5 / residual qi 0.3 | Multiplied by that branch's position weight |
Next comes the "support ratio" = (Resource + Peers) ÷ total weight:
- 0.55 or above is judged strong, 0.35 or below is judged weak, and anything in between is balanced.
- Branch relations are folded into the score. When directional combinations (san hui, 三會), three harmonies (san he, 三合) or half combinations (ban he, 半合) form, the element they produce gets extra points. A clash (liu chong, 六沖) discounts the hidden stems of the branch being clashed, which is the classic idea that "a clash shakes the root." The Five Stem Combinations are only noted for now and do not change the score. Whether a combination truly transforms is not yet part of the judgment.
- Being "in season" (the month branch's main qi is Resource or Peers) and being "rooted" (tong gen, 通根: a branch holds a hidden Peer) are listed separately, so you can compare with how the classical method puts it.
3. Follow Structures: Better to Miss One Than to Misjudge One
A Follow structure (cong ge, 從格) is the exception to support and restraint. When the Day Master is so weak it has nothing to lean on, it is no longer propped up. Instead it goes along with the strongest side (Follow Wealth, Follow Authority, Follow Output, Follow the Momentum). The reverse also exists: when it is so strong that nothing drains or controls it, it goes along with its own strength (Follow the Prosperous, Follow the Strong). The trouble is that once a chart is judged a Follow structure, the favorable and unfavorable elements flip as a whole. Misjudge an ordinary weak chart as a Follow-the-weak chart, and every piece of advice comes out exactly backwards.
So this site sets two thresholds:
- Confirmed Follow (weak side): support ratio of 0.12 or below, and no Peer root in the branches and no Resource anywhere on the chart. Even a little root or a little Resource "breaks the structure" (po ge, 破格), and the chart is read as weak.
- Confirmed Follow the Prosperous / Follow the Strong: support ratio of 0.90 or above, and Output, Wealth and Authority together come to almost zero.
- Charts that come close without meeting the bar (0.22 or below with no root and no Resource, or 0.82 or above with very little draining or controlling) are labeled "possible Follow structure." Favorable elements are still picked by the ordinary strong/weak rules, and the reasoning notes that a human review is recommended.
4. Favorable Elements in Three Layers
This site's favorable elements do not come from a single rule. They come from three stacked layers. At each layer the engine records one line of reasoning (the worked example below quotes these lines). For now the chart result shows only the final favorable and unfavorable elements. The line-by-line reasoning will be added to the screen over time.
Layer 1: Support and restraint (the base)
Support and restraint (fu yi, 扶抑) works like this. A strong Day Master is drained, controlled and spent: Output, Wealth and Authority are favorable, and Resource and Peers are unfavorable. A weak Day Master is generated and supported: Resource and Peers are favorable, and Output, Wealth and Authority are unfavorable. For a balanced chart, the weaker side gets a small top-up, with a note that "favorable and unfavorable elements are mild, and the ups and downs are smaller." This layer follows the strength theory of the Di Tian Sui (滴天髓) line, which is the backbone of most modern BaZi books.
Layer 2: Regulating the climate (cold and warm)
Regulating the climate (tiao hou, 調候) is the core idea of the Qiong Tong Bao Jian (窮通寶鑑): a chart born in winter is too cold and needs Fire to warm it; a chart born in summer is too dry and needs Water to moisten it. This site's cold/warm score = a baseline from the month command (the Yin to Wei months, roughly February to early August, lean warm; the Shen month is in the middle; the You to Chou months, roughly September to early February, lean cold; the Wu month is the hottest and the Zi month the coldest) + the difference between how much Fire and how much Water the chart holds.
- A score of −2 or below counts as cold and needs Fire. +2 or above counts as dry and hot and needs Water.
- If the chart already has enough Fire (or Water), nothing extra is added. Climate only joins the favorable elements when it is "needed and lacking."
- When a score only just crosses the threshold (within 0.5), the reasoning is reworded as "slightly" and noted as close to the line, so an edge case is not written up as a firm verdict.
Layer 3: Illness and remedy (too much becomes an illness)
Zhang Nan (張楠, also known as Zhang Shenfeng) of the Ming dynasty argued in the Shen Feng Tong Kao (神峰通考) that a chart becomes noble only when it has an "illness" to cure. His idea of illness and remedy (bing yao, 病藥): when one force on the chart goes too far, that excess is itself the problem, and whatever can restrain it is the remedy. This site treats a group as an illness only when all three conditions hold:
- the group makes up 36% or more of the chart's total weight;
- it is 1.5 times or more the second-largest group;
- its own weight is at least 3.
How the remedy is chosen: too much Resource, use Wealth to control Resource; too much Peers, use Authority to control and Output to drain; too much Output, use Resource to restrain it; too much Wealth, use Peers; too much Authority, use Resource to transform it and Output to restrain it. When illness and remedy applies, the remedy is promoted to a favorable element and placed first, and the illness is listed as unfavorable. This can override the support-and-restraint result.
How the three layers fit together
Support and restraint is the base. Climate "adds only what is missing." Illness and remedy "promotes the remedy, demotes the illness." If the element the climate needs happens to be unfavorable under support and restraint, the two pull against each other. Take a weak Jia Wood Day Master born in deep winter: support and restraint wants Water and Wood to generate and support it, so Fire, as Output that drains the Day Master, is unfavorable. Climate, though, needs Fire to warm the chart. In a case like this the site does not force a choice. It labels the chart a gray zone: "add a little, and let the Luck Pillars and annual years adjust it."
5. A Full Worked Example: Ren Zi, Ren Zi, Jia Shen, Geng Wu (壬子 壬子 甲申 庚午)
Here is a made-up chart, but one whose stem-branch combination is valid, run through every rule above from start to finish. All numbers below are the actual output of this site's engine.
子
子
申
午
- Sort and score: the Day Master is Jia (甲) Wood. Ren (壬) Water and Zi (子) Water generate Wood, so they are Resource. Geng (庚) Metal and Shen (申) Metal control Wood, so they are Authority. Wu (午) Fire is Output, and the Ji (己) Earth hidden in Wu is Wealth. After weighting: Resource 7.9, Authority 3.0, Output 1.2, Wealth 1.2, Peers 0.
- Branch relations: Zi and Wu clash, so the root of Wu Fire is discounted. Shen and Zi form a half combination that transforms into Water, so Water gains more points. Both entries go into the engine's reasoning.
- Strength: the support ratio is 0.594, above 0.55, so the Day Master is judged strong. Note that this "strength" rests entirely on Resource. There is not a single point of Peers.
- Support and restraint: strong, so Fire, Earth and Metal (Output, Wealth, Authority) are favorable, and Water and Wood are unfavorable.
- Climate: the Zi month is the coldest month of the year, and the chart has much Water and little Fire. The cold/warm score is −5.68, clearly cold. The only Fire on the chart is the bit in Wu, and it is clashed, so Fire is judged lacking: Fire is needed.
- Illness and remedy: Resource (Water) makes up 59% of the chart, 2.6 times the runner-up, Authority. "Too much Resource becomes an illness" applies. The remedy is Wealth, which controls Resource: that is Earth.
- Putting it together: the favorable elements, in order, are Earth, Fire, Metal (the remedy comes first), and the unfavorable elements are Water and Wood. In plain terms, this chart's problem is not a weak Day Master. It is waterlogged. It needs Earth to hold back the Water and Fire to warm the chart.
To see what your own chart comes to, cast a free chart on the home page, or generate an in-depth reading. Both use the same strength engine.
6. What the Engine Cannot Do
Being clear about the limits matters as much as being clear about the method:
- The weights and thresholds are this site's own quantification. They make the judgment reproducible and checkable. They do not mean the classics gave these numbers. Different weights can reach different conclusions in edge cases.
- The structure school's way of picking favorable elements is not part of the core yet. The Zi Ping Zhen Quan (子平真詮) sets a chart's structure (ge ju, 格局) from the month command and picks the useful element from that structure. That is a different road from this site's strength-based approach. The two often agree, but not always.
- Whether a stem combination truly transforms is not judged. Combinations are only noted as ties. When the Day Master combines with another stem, the engine notes that a human review is recommended.
- Symbolic stars (shen sha, 神煞) play no part in favorable elements. The symbolic-star articles on this site are background knowledge. The favorable-element calculation ignores them completely.
- What the engine gives you is a reasoned, checkable starting point, not a final verdict. BaZi content is for reference and self-understanding only and is not medical, investment, legal or any other professional advice.
7. Classical Ideas Behind the Method
This site does not copy the classics word for word. It takes the core ideas that the major schools agree on and writes them as reproducible program rules. Here is what comes from where:
- Di Tian Sui (滴天髓, the edition annotated by Ren Tieqiao 任鐵樵): strength, being in season and rooted, and Follow structures.
- Qiong Tong Bao Jian (窮通寶鑑): regulating the climate, that is, judging cold, warm, dry and damp by the birth month.
- Shen Feng Tong Kao (神峰通考, by Zhang Nan): illness and remedy.
- Zi Ping Zhen Quan (子平真詮, by Shen Xiaozhan 沈孝瞻): the basic framework of useful elements and structures. As noted above, picking elements by structure is not part of the calculation yet.
Report an Error
If you find a chart whose judgment is clearly unreasonable, or the rules on this page do not match the result on screen, please write and tell me. It helps to include the birth date and hour (or the Four Pillars). Every time the engine is fixed, this page is updated to match.
For more about the author, see About.