How a Zi Wei Dou Shu Chart Is Calculated (排盤)
Follow the calculation chain from birth inputs to palaces, stars, transformations, timing layers, and validation.
Overview
Chart calculation (Páipán, 排盤) is a sequence, not one formula: normalize the birth moment; derive the lunar year, month, day, and two-hour branch under a declared policy; place the Life and Body Palaces; assign the twelve roles and palace stems; determine the Five-Phase Bureau; place Zi Wei and the two major-star systems; add other stars, transformations, and timing; then validate and stamp the rulebook.
At a glance
- Required core
- Birth date and two-hour period
- Reproducibility
- Time zone, place, calendar, leap-month policy
- First anchors
- Life and Body Palaces
- Placement key
- Five-Phase Bureau and lunar day
- Output check
- 12 palaces and 14 major stars
- Audit key
- Rulebook and engine revision
The calculation chain
Normalize the civil instant and resolve the effective two-hour branch. Convert or validate the lunar fields, then use month and hour rules to place Life and Body, rotate the twelve palace roles, and derive palace stems and the Five-Phase Bureau.
Use the bureau and lunar day to locate Zi Wei; place its star sequence and the Tian Fu sequence; then place supporting, auxiliary, and miscellaneous stars. Apply the chosen Four-Transformation table and timing policies last.
- Expose intermediate values instead of returning only a picture.
- Fail closed when birth time or leap-month status is unresolved.
How to reproduce a chart
Save the raw input, normalized civil and effective times, location and time-zone source, calendar type, leap-month flag, gender field used for directional rules, and target date for timing.
Save the engine version and every rule that can change output: year boundary, day boundary, true-solar-time handling, leap-month split, school algorithm, brightness table, and Four-Transformation table.
- Inputs without policy are not a reproducible test case.
- A screenshot is not sufficient provenance.
Worked example and near-miss
Illustratively, a recorded 23:30 civil time might become 22:58 after an enabled location-based correction. That crosses from Rat hour to Pig hour, so Life and Body placement can change; the actual correction must be calculated from the real date and place.
A near-miss is to compare two calculators using the same birthday but omit time zone, longitude, leap-month status, or school. Matching visible inputs do not establish matching effective inputs.
- Compare effective hour branches, not only clock strings.
- Use a real, saved fixture for calculator tests.
OpenFate’s declared calculation policy
OpenFate stamps calculation revision openfate-ziwei-2026.07 and the pinned engine version. It records its configured placement and Four-Transformation policies, Spring Festival year boundaries, a true-solar-time-sensitive hour, and a split-half leap-month policy.
It configures placement algorithm and Four-Transformation table separately because changing one does not necessarily change the other. These settings must travel with any cached or published chart.
- Treat the rulebook stamp as part of the chart.
- Do not call one declared school the universal default.
Calculation certainty and interpretation uncertainty
Under fixed inputs and rules, chart construction can be deterministic. If the recorded time is wrong or near a boundary, multiple candidate charts may be equally plausible until better evidence is available.
A deterministic chart does not make its interpretation scientifically certain. Show the calculation facts, label traditional meanings, and avoid using birth-chart output as a substitute for direct evidence.
- Propagate input uncertainty through the whole chart.
- Do not convert computational precision into fate certainty.
Complete topic index
Every workbook topic assigned to this canonical page appears at a stable anchor. Each entry records scope, inputs, flags, and alias ownership as an auditable reference—not a standalone interpretation. Duplicate backlog rows resolve to the same anchor instead of creating duplicate URLs.
- Conditions and inputs
- Missing-input rule: if a listed input or verified chart value is unavailable, stop at the definition; do not infer, calculate, or predict the missing value.
- Calculation flag: yes. Reproduce the required inputs and versioned rule before interpretation.
- School-variant flag: yes. Apply only under an identified school or calculation policy and compare the alternate rule.
- Category and guidance boundary
- Apply this only under the named calculation or school policy, and compare alternate rules before treating the result as reproducible.
- Source inheritance
- Complete topic index does not assert an atom-specific citation. It inherits this canonical page’s bibliography and locator notes as page-level context only; verify the relevant cited passage before relying on a claim.
OpenFate Zi Wei Calculation Profile
- Topic-specific scope
- Named inputs: none recorded.
- Conditions and inputs
- Calculation state: Yes
- School-variant state: Yes
- Stable reference
- ZW-PUB-0065
- Inventory classification
- 02 曆法與出生資料 · 日期、時間與地點
Sources and editorial basis
- 《紫微斗數全書》 (Ziwei Doushu Quanshu)卷二「安身命例」及「安南北斗諸星訣」— 月、時、五行局、紫微與兩星系的排定次序A searchable transcription of the transmitted three-volume text, used for named rules, palace chapters, and historical star descriptions—not as scientific validation.
- iztro 紫微鬥數安星訣「安星訣」第1–18項:定寅首、安命身、定十二宮、起紫微、安兩主星系與安四化A public rule catalogue for placing the Life and Body Palaces, the twelve roles, Zi Wei, major-star systems, and Four Transformations, with explicit variant notes.
- OpenFate Ziwei Calculation Rulebookapp/modules/ziwei/logic/rulebook.ts:69–125,167–180 — versioned school, boundary, leap-month, time, and 四化 policiesThe product-owned calculation policy for engine version, boundaries, leap months, true solar time, placement rules, and Four Transformations. It proves configured behavior, not lineage.