Every Zi Wei Dou Shu chart is built the same way, in the same order: convert the birth date to the lunar calendar, locate the Ming Palace from the month and the hour, derive the Five Elements Bureau, place the Zi Wei star from the lunar day, and let the other thirteen major stars fall into fixed positions around it. None of the steps is difficult, but every one of them is a lookup most apps hide. This piece walks all five with the classical tables printed in full — including the 150-cell table that places Zi Wei for every lunar day in every bureau — and builds one real chart from birth data to a finished twelve-palace layout.
Step 1 — Convert the birth date to the lunar calendar
Zi Wei Dou Shu takes four inputs and none of them is a Gregorian date: the year stem (one of ten Heavenly Stems), the lunar month (1–12), the lunar day (1–30) and the hour branch (one of twelve two-hour periods). All four come from converting the solar birth date and time into the Chinese lunisolar calendar.
The year stem cycles through Jia 甲, Yi 乙, Bing 丙, Ding 丁, Wu 戊, Ji 己, Geng 庚, Xin 辛, Ren 壬 and Gui 癸. The lunar month and day come from the same conversion. The hour branch divides the day into twelve periods of two hours, beginning with Zi at 23:00:
| Branch | 支 | Hours |
|---|---|---|
| Zi | 子 | 23:00–00:59 |
| Chou | 丑 | 01:00–02:59 |
| Yin | 寅 | 03:00–04:59 |
| Mao | 卯 | 05:00–06:59 |
| Chen | 辰 | 07:00–08:59 |
| Si | 巳 | 09:00–10:59 |
| Wu | 午 | 11:00–12:59 |
| Wei | 未 | 13:00–14:59 |
| Shen | 申 | 15:00–16:59 |
| You | 酉 | 17:00–18:59 |
| Xu | 戌 | 19:00–20:59 |
| Hai | 亥 | 21:00–22:59 |
Three conventions vary between schools, and they are worth knowing before you compare calculators. A birth in a leap month is treated by some lineages as belonging to the month it repeats, and by others as the following month once past the 15th day. A birth between 23:00 and midnight — the first half of the Zi hour — is counted by some schools as the next lunar day and by others as the same day. And the year boundary is placed either at Lunar New Year, as most lunar-calendar practice has it, or at Li Chun, the solar term Ba Zi uses. None of these is an error; they are recorded choices, and a chart that differs from another only in these cases is a school difference rather than a mistake. Birth time matters here more than in most systems, because an hour boundary moves the Ming Palace.
Step 2 — Locate the Ming Palace and the Body Palace
The Ming Palace (命宮, the Life Palace) is found by counting: start at the Yin palace and move forward one palace per lunar month, then move backward one palace per hour branch. The first month lands on Yin itself, the second on Mao, the third on Chen, and so on; then from that palace a Zi-hour birth stays put, a Chou-hour birth steps back one, a Yin-hour birth steps back two, through to a Hai-hour birth stepping back eleven.
As a formula, with the branches numbered Zi = 0 through Hai = 11:
Ming Palace = (2 + month − 1 − hour) mod 12
The Body Palace (身宮) uses the same start and the same month count, but the hour count runs forward instead of back:
Body Palace = (2 + month − 1 + hour) mod 12
Once the Ming Palace is placed, the other eleven palaces are laid out counter-clockwise from it in a fixed sequence. Twelve palaces on twelve branches, so the Ming Palace's branch fixes every other palace's branch at once:
| Order | Palace | 宮 |
|---|---|---|
| 1 | Life (Ming) | 命宮 |
| 2 | Siblings | 兄弟 |
| 3 | Spouse | 夫妻 |
| 4 | Children | 子女 |
| 5 | Wealth | 財帛 |
| 6 | Health | 疾厄 |
| 7 | Travel | 遷移 |
| 8 | Friends | 交友 |
| 9 | Career | 官祿 |
| 10 | Property | 田宅 |
| 11 | Fortune | 福德 |
| 12 | Parents | 父母 |
The Body Palace is not a thirteenth palace. Because it sits an even number of steps from the Ming Palace, it always coincides with one of six: the Life, Spouse, Wealth, Travel, Career or Fortune palace. It marks the domain that gains weight in the second half of life, and the arithmetic guarantees it can never land anywhere else.
Step 3 — Find the Five Elements Bureau
The Five Elements Bureau (五行局) is a number from 2 to 6 — Water-2, Wood-3, Metal-4, Earth-5 or Fire-6 — derived from the Ming Palace's stem-and-branch pair. The branch is known from Step 2. The stem is assigned from the birth-year stem by the Five Tigers rule (五虎遁), which fixes the stem of the Yin palace and lets the others follow in order:
| Year stem | Stem of the Yin palace |
|---|---|
| Jia 甲 or Ji 己 | Bing 丙 |
| Yi 乙 or Geng 庚 | Wu 戊 |
| Bing 丙 or Xin 辛 | Geng 庚 |
| Ding 丁 or Ren 壬 | Ren 壬 |
| Wu 戊 or Gui 癸 | Jia 甲 |
Count from Yin to the Ming Palace, advancing one stem per palace, and the Ming Palace acquires a full stem-branch pair such as Bing Xu 丙戌. The Na Yin (納音) element of that pair is the bureau, carrying its fixed number: Water 2, Wood 3, Metal 4, Earth 5, Fire 6. The bureau does two things and both matter for what follows: it sets the pace at which the Zi Wei star moves through the palaces in Step 4, and it sets the age — equal to the bureau number — at which the first ten-year decade cycle begins. The full derivation, with the Na Yin logic, is in the Five Elements Bureau explainer.
Step 4 — Place the Zi Wei star
Zi Wei (紫微), the Emperor star, is placed from two numbers only: the lunar day of birth and the bureau number. The classical rule, carried by the placement verse in the Zi Wei Dou Shu Quan Shu, runs like this:
- Divide the lunar day by the bureau number.
- If it divides exactly, the quotient is a palace count: take Yin as the first palace and count forward. Zi Wei sits on the palace you reach.
- If it does not divide exactly, add the smallest number that makes it divide, and remember what you added. Count the quotient forward from Yin as before. Then, if the number you added is odd, step back that many palaces; if it is even, step forward that many.
Worked example: lunar day 24 in an Earth-5 bureau. 24 does not divide by 5; adding 1 gives 25, and 25 ÷ 5 = 5. Count five palaces from Yin — Yin, Mao, Chen, Si, Wu — and land on Wu. The number added was 1, which is odd, so step back one palace: Zi Wei sits in Si.
The verse also fixes the first day of each bureau as a check on your arithmetic — 六五四三二,酉午亥辰丑: Fire-6 begins at You, Earth-5 at Wu, Metal-4 at Hai, Wood-3 at Chen, Water-2 at Chou. Because most people would rather look it up than divide, the tradition also carries the result as a table. Here it is for every lunar day in every bureau:
| Lunar day | Water-2 | Wood-3 | Metal-4 | Earth-5 | Fire-6 |
|---|---|---|---|---|---|
| 1 | Chou 丑 | Chen 辰 | Hai 亥 | Wu 午 | You 酉 |
| 2 | Yin 寅 | Chou 丑 | Chen 辰 | Hai 亥 | Wu 午 |
| 3 | Yin 寅 | Yin 寅 | Chou 丑 | Chen 辰 | Hai 亥 |
| 4 | Mao 卯 | Si 巳 | Yin 寅 | Chou 丑 | Chen 辰 |
| 5 | Mao 卯 | Yin 寅 | Zi 子 | Yin 寅 | Chou 丑 |
| 6 | Chen 辰 | Mao 卯 | Si 巳 | Wei 未 | Yin 寅 |
| 7 | Chen 辰 | Wu 午 | Yin 寅 | Zi 子 | Xu 戌 |
| 8 | Si 巳 | Mao 卯 | Mao 卯 | Si 巳 | Wei 未 |
| 9 | Si 巳 | Chen 辰 | Chou 丑 | Yin 寅 | Zi 子 |
| 10 | Wu 午 | Wei 未 | Wu 午 | Mao 卯 | Si 巳 |
| 11 | Wu 午 | Chen 辰 | Mao 卯 | Shen 申 | Yin 寅 |
| 12 | Wei 未 | Si 巳 | Chen 辰 | Chou 丑 | Mao 卯 |
| 13 | Wei 未 | Shen 申 | Yin 寅 | Wu 午 | Hai 亥 |
| 14 | Shen 申 | Si 巳 | Wei 未 | Mao 卯 | Shen 申 |
| 15 | Shen 申 | Wu 午 | Chen 辰 | Chen 辰 | Chou 丑 |
| 16 | You 酉 | You 酉 | Si 巳 | You 酉 | Wu 午 |
| 17 | You 酉 | Wu 午 | Mao 卯 | Yin 寅 | Mao 卯 |
| 18 | Xu 戌 | Wei 未 | Shen 申 | Wei 未 | Chen 辰 |
| 19 | Xu 戌 | Xu 戌 | Si 巳 | Chen 辰 | Zi 子 |
| 20 | Hai 亥 | Wei 未 | Wu 午 | Si 巳 | You 酉 |
| 21 | Hai 亥 | Shen 申 | Chen 辰 | Xu 戌 | Yin 寅 |
| 22 | Zi 子 | Hai 亥 | You 酉 | Mao 卯 | Wei 未 |
| 23 | Zi 子 | Shen 申 | Wu 午 | Shen 申 | Chen 辰 |
| 24 | Chou 丑 | You 酉 | Wei 未 | Si 巳 | Si 巳 |
| 25 | Chou 丑 | Zi 子 | Si 巳 | Wu 午 | Chou 丑 |
| 26 | Yin 寅 | You 酉 | Xu 戌 | Hai 亥 | Xu 戌 |
| 27 | Yin 寅 | Xu 戌 | Wei 未 | Chen 辰 | Mao 卯 |
| 28 | Mao 卯 | Chou 丑 | Shen 申 | You 酉 | Shen 申 |
| 29 | Mao 卯 | Xu 戌 | Wu 午 | Wu 午 | Si 巳 |
| 30 | Chen 辰 | Hai 亥 | Hai 亥 | Wei 未 | Wu 午 |
Two properties of the table are worth noticing. Water-2 advances one palace every two days, which is why its column reads Chou, Yin, Yin, Mao, Mao and so on, ending at Chen on the 30th. And every bureau, being a different divisor, produces a different rhythm from the same day — which is the whole reason the bureau exists: two people born on the same lunar day in different bureaus get different star fields. The table above is the classical San He table, checked cell by cell against the division rule and against the day-one verse; it is the same in every lineage.
Step 5 — Distribute the other thirteen major stars
With Zi Wei placed, the remaining thirteen major stars go to fixed offsets, in two groups. The Zi Wei group of six runs counter-clockwise from Zi Wei. The Tian Fu group of eight runs clockwise from Tian Fu, and Tian Fu itself sits at Zi Wei's mirror image across the axis from Yin to Shen.
Zi Wei group, counted backward from Zi Wei:
| Star | 星 | Position |
|---|---|---|
| Zi Wei | 紫微 | anchor |
| Tian Ji | 天機 | 1 back |
| Tai Yang | 太陽 | 3 back |
| Wu Qu | 武曲 | 4 back |
| Tian Tong | 天同 | 5 back |
| Lian Zhen | 廉貞 | 8 back |
Tian Fu's position is the mirror of Zi Wei's:
| Zi Wei in | Tian Fu in |
|---|---|
| Yin 寅 | Yin 寅 |
| Mao 卯 | Chou 丑 |
| Chen 辰 | Zi 子 |
| Si 巳 | Hai 亥 |
| Wu 午 | Xu 戌 |
| Wei 未 | You 酉 |
| Shen 申 | Shen 申 |
| You 酉 | Wei 未 |
| Xu 戌 | Wu 午 |
| Hai 亥 | Si 巳 |
| Zi 子 | Chen 辰 |
| Chou 丑 | Mao 卯 |
Tian Fu group, counted forward from Tian Fu:
| Star | 星 | Position |
|---|---|---|
| Tian Fu | 天府 | anchor |
| Tai Yin | 太陰 | 1 forward |
| Tan Lang | 貪狼 | 2 forward |
| Ju Men | 巨門 | 3 forward |
| Tian Xiang | 天相 | 4 forward |
| Tian Liang | 天梁 | 5 forward |
| Qi Sha | 七殺 | 6 forward |
| Po Jun | 破軍 | 10 forward |
Fourteen stars on twelve palaces means some palaces hold two and some hold none. A palace with no major star is not blank: it is read through the palace directly opposite it, its 對宮, borrowing those stars. That is a rule of interpretation rather than of calculation, but one you will need the moment you look at a finished chart — the 12 Palaces and 14 Major Stars glossary entries cover what each palace and star is taken to mean.
The whole chart, for one real birth
Take a man born on 15 March 1985 at 08:30 local time.
Step 1. The lunar date is the 24th day of the 1st month of the Yi Chou 乙丑 year, so the year stem is Yi. 08:30 falls in the Chen hour.
Step 2. Month 1 lands on Yin. Chen is the fifth branch, so step back four: Yin → Chou → Zi → Hai → Xu. The Ming Palace is Xu. For the Body Palace step forward four instead: Yin → Mao → Chen → Si → Wu. The Body Palace is Wu, which the palace sequence makes the Wealth Palace.
Step 3. A Yi year gives the Yin palace the stem Wu 戊. Xu is eight palaces on from Yin, so eight stems on from Wu is Bing 丙. The Ming Palace is Bing Xu 丙戌; its Na Yin element is Earth (屋上土, earth on the roof). The bureau is Earth-5, and the first decade cycle will begin at age 5.
Step 4. Day 24, bureau 5: as worked above, Zi Wei in Si — which the table confirms.
Step 5. From Si, counting back: Tian Ji in Chen, Tai Yang in Yin, Wu Qu in Chou, Tian Tong in Zi, Lian Zhen in You. Tian Fu mirrors Si into Hai; counting forward from Hai: Tai Yin in Zi, Tan Lang in Chou, Ju Men in Yin, Tian Xiang in Mao, Tian Liang in Chen, Qi Sha in Si, Po Jun in You.
Laid over the twelve palaces from the Ming Palace in Xu:
| Palace | Branch | Major stars |
|---|---|---|
| Life (Ming) | Xu 戌 | none — reads from Travel opposite |
| Siblings | You 酉 | Lian Zhen, Po Jun |
| Spouse | Shen 申 | none — reads from Career opposite |
| Children | Wei 未 | none — reads from Property |
| Wealth (Body Palace) | Wu 午 | none — reads from Fortune |
| Health | Si 巳 | Zi Wei, Qi Sha |
| Travel | Chen 辰 | Tian Ji, Tian Liang |
| Friends | Mao 卯 | Tian Xiang |
| Career | Yin 寅 | Tai Yang, Ju Men |
| Property | Chou 丑 | Wu Qu, Tan Lang |
| Fortune | Zi 子 | Tian Tong, Tai Yin |
| Parents | Hai 亥 | Tian Fu |
Every pairing in that layout is one the classical texts describe — Zi Wei and Qi Sha only ever share a palace in Si or Hai, Wu Qu and Tan Lang only in Chou or Wei, Tian Tong and Tai Yin only in Zi or Wu — which is a useful way to check a hand-built chart. If a pairing appears that the tradition says cannot occur, a step went wrong.
What the calculation does not yet contain
The five steps produce the skeleton: which major star sits in which palace. Three more layers are applied on top, each a further lookup rather than a new calculation.
Brightness. Each star carries a brightness rating — from Miao (廟, brilliant) down to Xian (陷, trapped) — that depends only on the branch it lands in. The same star is read very differently at its brightest and at its dimmest; star brightness covers the scale.
The Four Transformations. The birth-year stem transforms four stars — one each into Lu (祿, flow), Quan (權, power), Ke (科, recognition) and Ji (忌, obstruction). Ten stems, ten fixed sets of four; the Four Transformations explains the table and where the schools disagree on it.
Auxiliary stars and the decade clock. Wen Chang and Wen Qu are placed from the hour branch, Zuo Fu and You Bi from the lunar month, and the ten-year Da Xian cycles run outward from the Ming Palace starting at the age the bureau set — clockwise for a man born in a yang year or a woman born in a yin year, counter-clockwise otherwise. The Da Xian entry has the mechanism.
Where calculators disagree, and where they do not
Because every step is a lookup, two correctly built charts for the same birth can still differ — but only at the recorded forks: the leap-month convention, the treatment of the first half of the Zi hour, the choice of Lunar New Year or Li Chun as the year boundary, and three of the forty Four Transformation assignments, for the Geng and Gui stems, which lineages dispute. Those are school differences, and a calculator that documents its choice is doing its job.
The placement rules themselves are not a school question. The Ming Palace count, the Five Tigers stems, the Na Yin bureau, the Zi Wei division rule and the offsets of the two star groups are identical across the San He, Si Hua and Fei Xing lineages; they are the shared machinery every school then interprets differently. A chart that puts Zi Wei somewhere other than where the table above puts it is not following a different school. It has a step wrong — and now you can check which one.
Once the stars are placed, the work of reading begins. How to read your Zi Wei Dou Shu chart takes the finished layout palace by palace, and the Zi Wei Dou Shu learn hub covers the system as a whole.
Frequently asked questions
How is a Zi Wei Dou Shu chart calculated?
In five steps, always in the same order. The birth date and time are converted to the Chinese lunar calendar, giving a year stem, a lunar month, a lunar day and an hour branch. The month and hour locate the Ming Palace. The Ming Palace and the year stem give the Five Elements Bureau, a number from 2 to 6. The bureau and the lunar day place the Zi Wei star. The remaining thirteen major stars then sit at fixed offsets from Zi Wei and from its mirror star Tian Fu. Brightness, the Four Transformations and the decade cycles are applied on top of that skeleton.
What is the Ming Palace formula?
Start at the Yin palace, move forward one palace per lunar month so that month 1 lands on Yin itself, then move backward one palace per hour branch, with a Zi-hour birth staying put. With the branches numbered Zi = 0 to Hai = 11 the formula is (2 + month − 1 − hour) mod 12. The Body Palace uses the same start and month count but moves forward by the hour instead: (2 + month − 1 + hour) mod 12.
How is the Zi Wei star placed?
From two numbers, the lunar day of birth and the Five Elements Bureau. Divide the day by the bureau number. If it divides exactly, count the quotient forward from Yin as the first palace. If it does not, add the smallest number that makes it divide, count the quotient forward from Yin, then step back that many palaces if the number you added was odd, or forward that many if it was even. The classical verse fixes day 1 as a check: Fire-6 at You, Earth-5 at Wu, Metal-4 at Hai, Wood-3 at Chen, Water-2 at Chou.
Where does Tian Fu go?
At the mirror image of Zi Wei across the axis that runs from Yin to Shen. Zi Wei in Yin puts Tian Fu in Yin, Zi Wei in Mao puts Tian Fu in Chou, Zi Wei in Si puts Tian Fu in Hai, and so on around the wheel; only Yin and Shen map to themselves. The eight stars of the Tian Fu group then run clockwise from Tian Fu at fixed distances, while the six stars of the Zi Wei group run counter-clockwise from Zi Wei.
Why do two calculators give me different Zi Wei Dou Shu charts?
Almost always because of a recorded school choice rather than an error: whether a leap-month birth belongs to the month it repeats or, past the 15th day, to the next; whether a birth between 23:00 and midnight counts as the next lunar day; whether the year turns over at Lunar New Year or at Li Chun; and three of the forty Four Transformation assignments, for the Geng and Gui stems, which lineages dispute. The placement rules themselves, from the Ming Palace count to the star offsets, are shared by every school, so a chart that places Zi Wei in a different palace has a step wrong rather than a different school.
Do I need my exact birth time?
Yes, to within the two-hour branch. The hour branch moves the Ming Palace by one palace per hour branch, so a birth at 06:50 and a birth at 07:10 produce two different Ming Palaces, two different bureaus in most cases, and therefore two entirely different star fields. A birth time recorded to the nearest hour is usually enough; a birth time that is unknown means the chart cannot be built with confidence.
What does an empty palace mean in Zi Wei Dou Shu?
Fourteen major stars over twelve palaces guarantees that some palaces hold two stars and some hold none. An empty palace is not blank: it is read through the palace directly opposite it on the wheel, borrowing those stars. An empty Ming Palace in Xu, for instance, is read through the stars in Chen. This is a rule of interpretation rather than of calculation, but you will need it the moment you look at a finished chart.
References
- Zi Wei Dou ShuWikipedia
- Chen TuanWikipedia
- Zi Wei Dou Shu Quan Shu (紫微斗數全書) — the classical placement versesBook
- Zi Wei Dou Shu placement verses and chart method, part 2 (紫微斗数安星诀与排盘方法详解)Website
- Placing the Zi Wei star by lookup table (查表法安紫微星)Website
- Zi Wei Dou Shu: Purple Star Astrology Reference BookBook