Zi Wei Dou Shu Chart (Purple Star Astrology)
Cast your 紫微斗數 12-palace natal chart
Zi Wei Dou Shu Chart (Purple Star Astrology)
How to use
Enter the birth date and time
Use the local date and clock time at the place of birth; no true-solar-time correction is applied. The date is converted with the Chinese calendar (UTC+8, checked against the Hong Kong Observatory tables for 1901-2100), and the year 干支 turns at Lunar New Year, not at 立春.
Check the two conventions
They only matter for a leap-month birth or a birth between 23:00 and 23:59. A leap month is charted as the next month by default, as the 全書 says; 23:00 stays on the same calendar day by default. Under the chart the page shows what the other rule gives.
Read the chart
Each palace shows its name, its 干支 and its stars: main stars in bold, the six malefic stars in red, and 四化 as small 祿/權/科/忌 badges. 命宮 is outlined and 身宮 carries a 身 badge. The centre gives the lunar birth date, yin/yang and gender, the 五行局, 命主 and 身主.
If you do not know the hour
Open the twelve-hour table under the chart: it lists 命宮, 身宮, the 五行局 and the main stars in 命宮 for every 時辰 of the same day.
Zi Wei Dou Shu (紫微斗數): how the chart is cast
紫微斗數 takes the lunar year, month, day and hour of birth and, by a fixed set of placement verses, seats fourteen main stars (led by 紫微) together with the six lucky stars (左輔 右弼, 文昌 文曲, 天魁 天鉞), the six malefic stars (擎羊 陀羅, 火星 鈴星, 地劫 天空), and 祿存 and 天馬, in twelve palaces named after the twelve earthly branches. From 命宮 the palaces run counter-clockwise: Siblings, Spouse, Children, Wealth, Health, Travel, Friends, Career, Property, Fortune, Parents.
The order is fixed. The birth month and hour give 命宮 and 身宮. The 命宮 stem comes from the year stem (五虎遁), and the 納音 element of the 命宮 stem-branch gives the 五行局 (Water 2, Wood 3, Metal 4, Earth 5, Fire 6). The bureau number and the lunar birth day decide where 紫微 sits. The six 紫微-series stars count backward from it; 天府 mirrors 紫微 across the 寅-申 axis and its eight stars count forward. The rest follow the birth month, the hour, the year stem or the year branch, and the year stem sets the four transformations. The table below gives each verse the page follows.
Corrected November 2026. Until then this page put 天府 on the wrong side of the 寅-申 axis, so the eight 天府-series stars sat in the palace opposite the right one in every chart; it had the 丙/丁 and 戊/己 rows of 祿存 swapped (and 擎羊, 陀羅 with them); and its 壬 row made 左輔 化科 where the 全書 has 天府. All three now follow the text, and 地劫, 天空, 天馬, 命主 and 身主 have been added.
The verses this chart follows
Text from the Wikisource transcription of the 紫微斗數全書, vol. 2 (the 天府 line from vol. 3). The English column says what the page does with it.
| Rule | Text | What the page does |
|---|---|---|
| 命宮, 身宮 | 從寅上起正月,順數至本生月止,又自人生月起子時逆至本生時安命,順至本生時安身。 | Count the month forward from 寅, then the hour backward for 命宮 and forward for 身宮. |
| Leap month | 又若閏月正月生者要在二月內起安身命,凡有閏月具要依此為例。 | Charted as the next month by default; the other two modern rules are selectable. |
| Palace stems, 五行局 | 甲己之歲起丙寅,乙庚之歲起戊寅,丙辛之歲起庚寅,丁壬之歲起壬寅,戊癸之歲起甲寅。 | The 納音 element of the 命宮 stem-branch (from the 六十花甲子納音歌) sets the bureau: Water 2, Wood 3, Metal 4, Earth 5, Fire 6. |
| 紫微 | 如是正月初一生者是火局,酉宮起初一日,就從酉宮起紫微。 | Divide the lunar day by the bureau, topping up to a whole multiple; an odd top-up counts back, an even one forward. All 150 cells of the table are tested. |
| The 14 main stars | 紫微天機逆行旁,隔一陽武天同當,又隔二位廉貞地……天府太陰與貪狼,巨門天相及天梁,七殺空三破軍位,八星順數細推詳。 | The 紫微 series counts backward, the 天府 series forward. |
| Where 天府 sits | 紫微天府同宮……紫府同在寅申宮守命。(卷三) | 天府 mirrors 紫微 across the 寅-申 axis, so the two share a palace only in 寅 and 申. |
| 左輔, 右弼 | 左輔正月起於辰,順逢生月是貴方,右弼正月宮尋戌,逆至正月便調停。 | By the birth month. |
| 文昌, 文曲 | 子時戌上起文昌,逆到生時是貴鄉,文曲數從辰上起,順到生時是本鄉。 | By the birth hour. |
| 天魁, 天鉞 | 甲戊庚牛羊,乙己鼠猴鄉,六辛逢虎馬,壬癸免蛇藏,丙丁豬狗位,此是貴人方。 | By the year stem. The transcription has 免 for 兔, and 豬狗 and 虎馬 where the reading in general circulation has 豬雞 and 馬虎; the page uses the latter: 丙/丁 魁 亥 鉞 酉, 辛 魁 午 鉞 寅. |
| 祿存, 擎羊, 陀羅 | 甲生祿存在寅宮,乙生在卯丙戊巳,丁己祿存停午方,庚祿居申辛祿酉,壬祿在亥癸祿子。祿前擎羊後陀羅。 | By the year stem; 擎羊 one palace ahead of 祿存, 陀羅 one behind. |
| 天馬 | 寅午戌人馬居申,申子辰人馬居寅,巳酉丑人馬居亥,亥卯未人馬居巳。 | By the year branch. |
| 火星, 鈴星 | 寅午戌人丑卯方,申子辰人寅戌揚,巳酉丑人卯戌位,亥卯未人酉戌房。 | The verse gives only the starting palaces; both stars are then counted forward to the birth hour. Other lineages differ here. |
| 地劫, 天空 | 亥上起子順安劫,逆向便是天空鄉。 | By the birth hour. The text calls the second star 天空; most modern charts say 地空. |
| 四化 (祿權科忌) | 甲廉破武陽為伴,乙機梁紫月交侵,丙同機昌廉貞位,丁月同機巨門尋,戊貪月弼機為主,己武貪梁曲最平,庚日武陰同為首,辛巨陽曲昌至臨,壬梁紫府武宿是,癸破巨陰貪狼停。 | By the year stem, in the order 祿 權 科 忌. Other lineages use different 庚 and 壬 rows. |
| 命主, 身主 | 貪狼子宮,巨門丑亥宮,祿存寅戌宮,文曲卯酉宮,廉真申辰宮,武曲巳未宮,破軍午宮。子午人火玲星,丑未人天相星,寅申人天梁星,卯酉人天同星,辰戌人文昌星,巳亥人天機星。 | 命主 by the 命宮 branch, 身主 by the year branch; for 子 and 午 years the page gives 火星 for the text's 火玲星. |
Frequently Asked Questions
-
The placement verses of the 紫微斗數全書, vol. 2, quoted in the table above. Later lineages use other 庚 and 壬 rows of the 四化 and other 火/鈴 rules, so differences in exactly those places are expected when you compare with other tools.
-
The hour cannot be guessed: 命宮, 身宮, 文昌/文曲, 火/鈴 and 地劫/天空 all move with it, so picking any clock time does not give an "approximate" chart. Open the twelve-hour table under the chart to see what each 時辰 of the same day gives.
-
The 全書 says a leap-month birth is charted in the following month, and that is the default here. Two modern alternatives exist: days 1-15 of the leap month as the month itself and 16 onward as the next, or always the month itself. All three are under "Conventions", and the page lists what the other two give. Lunar months are checked against the Hong Kong Observatory tables; for example, the leap second month of 2023 began on 22 March.
-
That hour is 子, but whether it belongs to the same day or the next is not settled; vol. 3 of the 全書 itself calls the 子 and 亥 hours the hardest to fix. The default is the same calendar day, and "Conventions" switches it to the next. For a birth in that hour the page shows what the other rule gives.
-
紫微斗數 is cast on the lunar year, month, day and hour, so the year 干支 turns at 正月初一; it is bazi that turns the year at 立春. A birth after 立春 on 4 February 2024 but before Lunar New Year on 10 February is still charted as a 癸卯 year here.
-
No. The chart is cast in your browser. Your birth details are not sent to our servers and are not put in the page address.
-
No. 紫微斗數 is a cultural tradition; this page places stars by its verses, interprets nothing and predicts nothing. Base decisions about marriage, work, health or moving on your circumstances and on professional advice.
Method & sources
How it computes
The placement verses of the 紫微斗數全書 vol. 2: 命宮/身宮 from 寅 by lunar month and hour, 五行局 from the 納音 of the 命宮 stem-branch, 紫微 by the bureau and lunar day, the 紫微 series backward, 天府 mirrored across the 寅-申 axis and its series forward, then the six lucky and six malefic stars, 祿存, 天馬 and the 四化 by the year stem. Lunar dates from the lunisolar engine (UTC+8, HKO-checked); the year turns at 正月初一.
What this tool implements
- Every rule follows the 紫微斗數全書, vol. 2 (安身命例, 起五行寅例, 六十花甲子納音歌, 安南北斗諸星訣, 安文昌文曲, 安左輔右弼, 安天魁天鉞, 安天馬, 安祿存, 安擎羊陀羅, 安火鈴, 天空地劫訣, 四化訣, 安命主, 安身主), read on Wikisource 2026-11-06; the page quotes each verse beside what it does.
- 天府 is the mirror of 紫微 across the 寅-申 axis, so the two share a palace only in 寅 and 申 (vol. 3: 「紫府同在寅申宮守命」). Corrected 2026-11-06 from a 巳-亥 mirror that put all eight 天府-series stars in the opposite palace in every chart.
- Corrected 2026-11-06: 祿存 丙/戊 → 巳 and 丁/己 → 午 (were swapped, moving 擎羊 and 陀羅); 壬 四化 = 天梁 祿, 紫微 權, 天府 科, 武曲 忌 (化科 was 左輔). 地劫, 天空, 天馬, 命主 and 身主 added from the same text.
- Leap month charted as the following month by default, per 安身命例 「閏月正月生者要在二月內起安身命」; the modern half-month split and same-month rules are selectable, and the page shows what each gives. 23:00-23:59 stays on the same calendar day by default, with the next-day rule selectable and its result shown.
- Where the text leaves room it says so: the Wikisource transcription of the 魁鉞 verse reads 豬狗 and 虎馬 where the reading in general circulation has 豬雞 and 馬虎, and the latter is used; the 火鈴 verse gives only starting palaces, and both stars are counted forward to the hour. Other lineages use other 庚 and 壬 rows of the 四化.
- Cultural reference only. The page places stars by the verses and interprets nothing; no prediction is made or implied.
Sources
- 紫微斗數全書, vol. 2 (安星 rules) — Wikisource transcription: https://zh.wikisource.org/wiki/紫微斗數全書/卷二
- 紫微斗數全書, vol. 3 (紫府同宮 in 寅申; 子亥 hours 「最難定」) — Wikisource transcription: https://zh.wikisource.org/wiki/紫微斗數全書/卷三
- Hong Kong Observatory. 公曆與農曆日期對照表 (Gregorian-Lunar Calendar Conversion Table), the check on every lunar date, e.g. 2023 閏二月 from 22 March 2023: hko.gov.hk
- SylarLong. iztro, an open-source 紫微斗數 engine (MIT), src/star/location.ts — independent corroboration of the 天府 mirror, the 祿存 and 魁鉞 tables and its worked 紫微 examples: https://github.com/SylarLong/iztro/blob/main/src/star/location.ts
What can make this go out of date
- None at runtime: the chart is computed in the browser and nothing typed is sent anywhere.