Method · 排盤 · calculation pipeline
How a Zi Wei Dou Shu Chart Is Calculated
A Zi Wei Dou Shu chart is calculated from a birth date, a two-hour birth period, gender, and a declared set of calendar rules. The calculation converts the date to the Chinese lunar calendar, locates the Life and Body Palaces from the lunar month and birth hour, assigns the Five-Element Bureau, places Zi Wei and the other thirteen major stars, adds the auxiliary stars, applies the Four Transformations for the birth-year stem, and lays out the ten-year cycles. Two calculators can disagree when they use different leap-month, Zi-hour, time-correction, or transformation-table rules.
- Inputs
- Gregorian birth date, two-hour birth window (or unknown), gender
- Outputs
- Lunar date, Life and Body Palace, bureau, 12 palaces with stems, 14 major stars with brightness, auxiliary stars, Four Transformations, decade cycles
- Deterministic
- Yes. The same input always returns the same chart; no randomness and no AI in the calculation
- Engine on kaucim.ai
- iztro 2.5.8, open source, with one convention overridden (late Zi stays on the same date)
- Where calculators differ
- Leap month, late Zi hour, year boundary, true solar time, transformation table, star algorithm
The eight steps
- Convert the calendar. The Gregorian date becomes a lunar year, month, and day. The birth time becomes one of twelve Earthly Branch hours (thirteen windows once early and late Zi are separated).
- Locate the Life Palace and Body Palace. Count forward from 寅 by lunar month, then backward by hour for the Life Palace and forward by hour for the Body Palace. See the 12 palaces for the counting rule.
- Assign palace stems. The birth-year stem fixes the stem of the 寅 cell (the 五虎遁 rule), and the other eleven stems follow in order.
- Find the Five-Element Bureau. The Life Palace's stem and branch pair has a nayin element; that element gives the bureau: Water 2, Wood 3, Metal 4, Earth 5, Fire 6. The number is the age at which the first decade starts.
- Place Zi Wei. The bureau number and the lunar day of birth fix the cell of the Zi Wei star through a fixed lookup. Every other major star is then a fixed offset; see the 14 major stars.
- Place the auxiliary stars. Zuo Fu and You Bi from the lunar month; Wen Chang and Wen Qu from the hour; Lu Cun, Qing Yang, Tuo Luo, Tian Kui, and Tian Yue from the year stem; Huo Xing, Ling Xing, and Tian Ma from the year branch and hour; and so on down the list.
- Apply the Four Transformations. Read the row of the transformation table for the birth-year stem and label those four stars Lu, Quan, Ke, Ji.
- Lay out the cycles. The first decade begins in the Life Palace at the bureau age and moves one palace per decade, clockwise for yang-year males and yin-year females, counter-clockwise otherwise. Annual and monthly layers sit on top.
Calculation assumptions kaucim.ai uses
These are the conventions in force on every chart cast at /en/ziwei. They are read from the engine configuration, and a test in the code base checks the ones that can be checked mechanically.
| Rule | kaucim.ai uses | Note |
|---|---|---|
| Input calendar | Gregorian date, converted to the Chinese lunar calendar by the engine | |
| Birth hour | One of thirteen two-hour windows chosen by the reader (early Zi 00:00 to 01:00, then Chou through Hai, then late Zi 23:00 to 24:00) | |
| Late Zi (23:00 to 24:00) | Stays on the same calendar date (San He convention). Early and late Zi of one date cast the same chart | iztro's default rolls late Zi to the next day; kaucim.ai overrides it |
| Unknown birth hour | The chart is cast at the Wu reference hour (11:00 to 13:00) and marked uncertain; Life and Body Palace are not treated as established | |
| True solar time | Not applied automatically. The reader chooses the window their corrected time falls in | See the true solar time page for when it matters |
| Leap month | First half of a leap month counts as the preceding month, second half as the following month (iztro fixLeap) | |
| Year boundary | Lunar New Year (iztro yearDivide normal), so the birth-year stem for the Four Transformations changes at the first day of the first lunar month | |
| Four Transformations table | iztro default table (the widely used San He table shown on the Four Transformations page); 庚 row is 太陽 武曲 太陰 天同 | |
| Star placement algorithm | iztro default (not the Zhongzhou variant) | |
| Decade cycles | First decade starts at the bureau number; direction clockwise for yang-year males and yin-year females, counter-clockwise otherwise | |
| Gender | Used only for cycle direction; either value can be entered | |
| Engine | iztro 2.5.8, open source, deterministic: the same input always returns the same chart |
Worked example
Birth: 6 February 1995, 15:00 to 17:00 (Shen hour), male. Step 1 gives the 7th day of the 1st lunar month, 1995 (乙亥 year), hour branch 申. Step 2 places the Life Palace at 午 and the Body Palace at 戌. Step 3 gives the Life Palace the stem 壬 (year stem 乙 starts 寅 at 戊). Step 4: 壬午 has the nayin element Wood, so the bureau is 木三局 (Wood, 3) and the first decade runs from ages 3 to 12. Step 5 places Zi Wei at 午. Step 7 attaches Lu to Tian Ji, Quan to Tian Liang, Ke to Zi Wei, Ji to Tai Yin. Step 8 runs the decades counter-clockwise (yin year, male): 午 for ages 3 to 12, 巳 for 13 to 22, 辰 for 23 to 32, and so on.
Why two calculators can produce different charts
| Rule | Options in use | What changes |
|---|---|---|
| Late Zi hour (23:00 to 24:00) | Same day (San He, kaucim.ai) or roll to the next day (iztro default, many apps) | The lunar day, so Zi Wei's cell and everything after it |
| Leap month | First half to previous month and second half to next (kaucim.ai); whole leap month as previous; whole as next | The month cell, so the Life Palace |
| Year boundary | Lunar New Year (kaucim.ai) or Li Chun | The year stem for births in late January and early February, so the Four Transformations and palace stems |
| True solar time | Not applied (kaucim.ai, reader picks the window) or applied from birthplace longitude | The hour branch near a boundary, so the Life Palace |
| Transformation table | San He table (kaucim.ai) or a Zhongzhou row for 庚 and some 壬 variants | The Ke and Ji stars for 庚-year and 壬-year births |
| Star algorithm | Default or Zhongzhou | A few auxiliary star seats |
| Gender | Used for cycle direction | Which way the decades run, not the natal chart |
When two charts for the same birth differ, compare these rules first. A chart is not wrong because it applies a different stated convention; it is wrong only when it applies a convention it does not state.
Common mistakes
- Entering a birth after midnight with the previous day's date. A 00:30 birth belongs to the new civil date and the early-Zi window.
- Asking a chatbot to cast the chart. Language models regularly misplace the bureau, the decades, and the star offsets; a deterministic engine does not.
- Reading a chart cast at a reference hour as if the hour were known. Without the hour, the Life and Body Palace are not established.
- Assuming an exact birth minute makes the chart more precise. The chart resolves to two-hour windows; the minute only matters for deciding which window.
Questions people ask
Is the Zi Wei Dou Shu calculation deterministic?
Yes. Given the same date, hour window, gender, and rule set, the chart is identical every time. Randomness and interpretation are separate layers that come after the chart.
Which engine does kaucim.ai use?
iztro 2.5.8, an open-source charting library, with the day-boundary rule set to keep a late-Zi birth on the same date. Everything else runs at the library default.
Does the calculation use true solar time?
Not automatically. kaucim.ai asks you to choose the two-hour window. If your clock time sits within about half an hour of a boundary, read true solar time and choose the window your corrected time falls in.
What if my birth date is in the lunar calendar?
Convert it to the Gregorian date first (any lunar calendar converter will do), then enter that. Entering a lunar date in the Gregorian field shifts the whole chart.
Related concepts
Sources and calculation version
- iztro documentation · engine API and configuration options
- iztro source · MIT licence; the same code runs on kaucim.ai
- kaucim.ai methodology
Last checked against the chart engine on 2026-09-14.
The free chart applies every rule in the table above and shows the result before any interpretation.
Run the calculation on your birth