1. The four steps
A chart number (局數) is a number from 1 to 9. It sets the palace where Wu (戊), the first of the Six Instruments (六儀), starts. Yang Dun (陽遁) and Yin Dun (陰遁) each have 9 chart numbers, making 18 in all.
- Find the day's solar term (節氣). This determines Yang Dun or Yin Dun.
- Find the day's Heavenly Stem and Earthly Branch. Look back to the nearest Jia (甲) or Ji (己) day. That day is the fu tou (cycle head) (符頭).
- Use the fu tou's Earthly Branch to identify the upper, middle, or lower yuan (上中下元).
- Use the solar term and yuan to find the chart number in section 4.
There are two ways to handle the solar term in step 1: Chaibu (拆補) and Zhirun (置閏). Section 6 compares them.
I'm Sona Orbit, the solo developer of Chengshi: Qimen Timing (乘時). This article introduces traditional methods. I draw mainly from older books available to read online and link to each book when it first appears. Where books disagree, I present their accounts side by side rather than choose one. This is an introduction to traditional culture, not advice on what to do. Updated in December 2026.
2. Yang Dun and Yin Dun
| Yang Dun | Yin Dun | |
|---|---|---|
| Period | Winter Solstice (冬至) through Grain in Ear (芒種), 12 solar terms | Summer Solstice (夏至) through Major Snow (大雪), 12 solar terms |
| Six Instruments (六儀): Wu (戊), Ji (己), Geng (庚), Xin (辛), Ren (壬), Gui (癸) | Place them in ascending palace-number order | Place them in descending palace-number order |
| Three Wonders (三奇): Ding (丁), Bing (丙), Yi (乙) | Place them after the Six Instruments; viewed in Yi (乙), Bing (丙), Ding (丁) order, they run backward | Place them after the Six Instruments; viewed in Yi (乙), Bing (丙), Ding (丁) order, they run forward |
| Eight Spirits (八神) | Clockwise | Counterclockwise |
Older books describe Yang Dun as placing the Six Instruments forward and the Three Wonders backward, with the reverse for Yin Dun. That sounds like two directions. In practice, remember one sequence: Wu (戊), Ji (己), Geng (庚), Xin (辛), Ren (壬), Gui (癸), Ding (丁), Bing (丙), Yi (乙). Move through palace numbers upward for Yang Dun and downward for Yin Dun.
3. Upper, middle, and lower yuan
A solar term lasts about 15 days. It is divided into three yuan of 5 days each, or 60 two-hour periods (時辰) per yuan. The first day of each 5-day span is a Jia (甲) or Ji (己) day. That day is its fu tou. Wujing Zongyao (武經總要), sorts the fu tou into three groups by Earthly Branch. There are exactly 12 fu tou in 60 days.
| Yuan | Fu tou Earthly Branches | 12 fu tou |
|---|---|---|
| Upper yuan (上元) | Zi (子), Wu (午), Mao (卯), You (酉) | Jia (甲)-Zi (子), Jia (甲)-Wu (午), Ji (己)-Mao (卯), Ji (己)-You (酉) |
| Middle yuan (中元) | Yin (寅), Shen (申), Si (巳), Hai (亥) | Jia (甲)-Yin (寅), Jia (甲)-Shen (申), Ji (己)-Si (巳), Ji (己)-Hai (亥) |
| Lower yuan (下元) | Chen (辰), Xu (戌), Chou (丑), Wei (未) | Jia (甲)-Chen (辰), Jia (甲)-Xu (戌), Ji (己)-Chou (丑), Ji (己)-Wei (未) |
For example, if the day is Geng (庚)-Xu (戌), the previous day is Ji (己)-You (酉). Ji (己)-You (酉) is the fu tou. You (酉) belongs to the upper yuan, so this is its second day.
4. Chart numbers for 24 solar terms
The 3 numbers in each cell give the chart numbers for the upper, middle, and lower yuan, in that order. Winter Solstice 1, 7, 4 means chart number 1 for the upper yuan, 7 for the middle, and 4 for the lower.
| Palace | First solar term | Second solar term | Third solar term |
|---|---|---|---|
| Kan 1 (坎1) · Yang Dun (陽遁) | Winter Solstice 1, 7, 4 | Minor Cold (小寒) 2, 8, 5 | Major Cold (大寒) 3, 9, 6 |
| Gen 8 (艮8) · Yang Dun (陽遁) | Start of Spring (立春) 8, 5, 2 | Rain Water (雨水) 9, 6, 3 | Awakening of Insects (驚蟄) 1, 7, 4 |
| Zhen 3 (震3) · Yang Dun (陽遁) | Spring Equinox (春分) 3, 9, 6 | Clear and Bright (清明) 4, 1, 7 | Grain Rain (穀雨) 5, 2, 8 |
| Xun 4 (巽4) · Yang Dun (陽遁) | Start of Summer (立夏) 4, 1, 7 | Grain Full (小滿) 5, 2, 8 | Grain in Ear 6, 3, 9 |
| Li 9 (離9) · Yin Dun (陰遁) | Summer Solstice 9, 3, 6 | Minor Heat (小暑) 8, 2, 5 | Major Heat (大暑) 7, 1, 4 |
| Kun 2 (坤2) · Yin Dun (陰遁) | Start of Autumn (立秋) 2, 5, 8 | End of Heat (處暑) 1, 4, 7 | White Dew (白露) 9, 3, 6 |
| Dui 7 (兌7) · Yin Dun (陰遁) | Autumn Equinox (秋分) 7, 1, 4 | Cold Dew (寒露) 6, 9, 3 | Frost's Descent (霜降) 5, 8, 2 |
| Qian 6 (乾6) · Yin Dun (陰遁) | Start of Winter (立冬) 6, 9, 3 | Minor Snow (小雪) 5, 8, 2 | Major Snow 4, 7, 1 |
You do not have to memorize the table. Three rules produce all 72 cells from 8 numbers.
- In each row, the upper-yuan number for the first solar term is that palace's Lo Shu (洛書) number. Kan 1 starts Winter Solstice at 1; Li 9 starts Summer Solstice at 9.
- Moving right in a row, add 1 to the upper-yuan number for Yang Dun or subtract 1 for Yin Dun.
- Moving through the yuan in a cell, add 6 each time for Yang Dun or subtract 6 for Yin Dun. Wrap around when the result goes above 9 or below 1.
These rules also help spot copying differences. The Wikisource text of Wujing Zongyao (武經總要) gives Minor Heat as 8, 5, 2. Yixue Xiangshu Lun (易學象數論), gives End of Heat as 1, 7, 4. The rules give 8, 2, 5 and 1, 4, 7 instead. The two books help check each other. I map the 3 solar terms assigned to each bagua trigram in my article on the Nine Palaces (九宮) and Later Heaven bagua (後天八卦).
5. Worked example: December 2, 2026, at 10 a.m.
Here is a chart built from the start using Taipei time and Chaibu.
- Solar term: Minor Snow begins on November 22 at 15:23. Major Snow does not begin until December 7 at 10:52. This day falls in Minor Snow, so use Yin Dun.
- Day and fu tou: December 2 is a Geng (庚)-Xu (戌) day. Its fu tou is the previous day, Ji (己)-You (酉), which belongs to the upper yuan.
- Chart number: Minor Snow is 5, 8, 2. The upper yuan uses 5, so this is Yin Dun chart number 5.
- Hour stem and branch: 10 a.m. falls in the Si (巳) two-hour period. On a Geng (庚) day, that period is Xin (辛)-Si (巳). It belongs to the Jia (甲)-Xu (戌) cycle, whose Jia (甲) is hidden under Ji (己).
- Earth Plate (地盤): Start Wu (戊) at Center 5 (中5), then count down through the palace numbers: Wu (戊) 5, Ji (己) 4, Geng (庚) 3, Xin (辛) 2, Ren (壬) 1, Gui (癸) 9, Ding (丁) 8, Bing (丙) 7, Yi (乙) 6.
- Chief (值符) and Duty Door (值使): Ji (己) is in Xun 4. The star based in Xun 4 is Tianfu (天輔), and its door is Block Door (杜門). Tianfu is the Chief star, and Block Door is the Duty Door.
- Heaven Plate (天盤) and Nine Stars (九星): The hour stem Xin (辛) is in Kun 2. Rotate Tianfu to Kun 2, then rotate the other stars with it.
- Eight Doors (八門): Count 7 steps from Jia (甲)-Xu (戌) to Xin (辛)-Si (巳). Count backward from Xun 4 through 3, 2, 1, 9, 8, 7, 6. Block Door lands in Qian 6. Rotate the other doors with it.
- Eight Spirits: Chief lands in Kun 2. For Yin Dun, place the spirits counterclockwise. Serpent (螣蛇) goes in Li 9, Moon (太陰) in Xun 4, and the rest follow.
The completed chart has south at the top. From top to bottom, each cell shows the Spirit, Star, Door, and Heaven Plate stem / Earth Plate stem. Center 5 holds only Earth Plate Wu (戊). Tianqin (天禽) accompanies Tianrui (天芮) in Qian 6.
| Palace | Spirit | Star | Door | Heaven Plate stem / Earth Plate stem |
|---|---|---|---|---|
| Kan 1 (坎1) | Black Tortoise (玄武) | Tianzhu (天柱) | View Door (景門) | Bing (丙) / Ren (壬) |
| Kun 2 (坤2) | Chief (值符) | Tianfu (天輔) | Life Door (生門) | Ji (己) / Xin (辛) |
| Zhen 3 (震3) | Six Harmony (六合) | Tianpeng (天蓬) | Fear Door (驚門) | Ren (壬) / Geng (庚) |
| Xun 4 (巽4) | Moon (太陰) | Tianren (天任) | Open Door (開門) | Ding (丁) / Ji (己) |
| Qian 6 (乾6) | Nine Earth (九地) | Tianrui (天芮), Tianqin (天禽) | Block Door (杜門) | Xin (辛), Wu (戊) / Yi (乙) |
| Dui 7 (兌7) | Nine Heaven (九天) | Tianying (天英) | Harm Door (傷門) | Gui (癸) / Bing (丙) |
| Gen 8 (艮8) | White Tiger (白虎) | Tianxin (天心) | Death Door (死門) | Yi (乙) / Ding (丁) |
| Li 9 (離9) | Serpent (螣蛇) | Tianchong (天沖) | Rest Door (休門) | Geng (庚) / Gui (癸) |
For the traditional meanings of these parts, see my articles on the Eight Doors and the Nine Stars and Eight Spirits.
6. How Chaibu and Zhirun differ
A solar term lasts about 15.2 days, while three yuan always total 15 days. The small difference adds up. Chaibu and Zhirun handle it differently.
| Chaibu | Zhirun | |
|---|---|---|
| What sets the change | The moment the solar term begins. Use the new solar term's chart number from that moment. | The upper-yuan fu tou. If it arrives first, start the next solar term early, called Chaoshen (超神). If it arrives later, keep using the previous term, called Jieqi carry-over (接氣). |
| Yuan order | May start with the middle or lower yuan and make up the upper yuan afterward. | Always completes upper, middle, and lower yuan in order. |
| How the difference is handled | It does not accumulate. | When the fu tou gets too far ahead, repeat all three yuan at Grain in Ear or Major Snow. This is a leap round (閏奇). |
| When Yang Dun and Yin Dun switch | At the moment the Winter Solstice or Summer Solstice begins. | At the solstice's upper-yuan fu tou, which may be before or after the solstice. |
The two methods applied to the same dates, November 26 through December 31, 2026. Dashed lines mark the moments Major Snow and the Winter Solstice begin. Shaded sections use Yang Dun. For readability, the chart labels changes by date. When building a chart, I change the day at 23:00.
Three differences stand out.
- December 1, Ji (己)-You (酉), is an upper-yuan fu tou before Major Snow begins. Zhirun has already switched to Major Snow, Yin Dun chart number 4. Chaibu still uses Minor Snow, Yin Dun chart number 5.
- December 16, Jia (甲)-Zi (子), is another upper-yuan fu tou. Zhirun starts Winter Solstice, Yang Dun chart number 1. Chaibu is still in Major Snow, Yin Dun chart number 4. For these days, even Yang Dun and Yin Dun differ.
- The methods line up again later. From December 11 through 15, both use Major Snow's lower yuan, Yin Dun chart number 1.
I calculated every two-hour period from 2025 through 2035. Of 48,204 periods, 15,750 have different chart numbers under the two methods, or 32.7%. For Zhirun here, I add a leap round when Chaoshen reaches 9 days.
7. Two examples from older books
Chaibu: Start of Spring in the 24th year of Wanli
Dunjia Yanyi (遁甲演義), works through an example day by day. Start of Spring falls on Bing (丙)-Zi (子), the 9th day of the 1st lunar month in the 24th year of Wanli. Its fu tou is Jia (甲)-Xu (戌), which belongs to the lower yuan. The book therefore starts with Start of Spring's lower yuan, Yang Dun chart number 2, calling it an unfinished round. On Ji (己)-Mao (卯), it uses the upper yuan, Yang Dun chart number 8. On Jia (甲)-Shen (申), it uses the middle yuan, Yang Dun chart number 5. On Ji (己)-Chou (丑), it returns to the lower yuan, Yang Dun chart number 2, to complete the unused two-hour periods. The book calls this making up the round. Every chart number I derive for this stretch matches the book, as do those for the following Rain Water and Awakening of Insects solar terms.
Qimen Baojian Yuding (奇門寶鑑御定), objects to this approach. It argues that putting the lower yuan before the upper yuan conflicts with treating the fu tou as the start. Dunjia Yanyi also uses Chaoshen and leap rounds in the same chapter. It treats Chaibu as a way to handle Jieqi carry-over. What people now call Chaibu generally follows only the moment a solar term begins, without adding leap rounds.
Zhirun: Major Snow in the Ji (己)-Chou (丑) year of Wanli
Yixue Xiangshu Lun, “Chaoshen Jieqi Zhizhi” (易學象數論・超神接氣直指), gives a complete Zhirun example. That year, Major Snow begins on the 29th day of the 10th lunar month. The fu tou, Jia (甲)-Wu (午), arrives on the 20th, 9 days early. After all three yuan of Major Snow, the next fu tou, Ji (己)-You (酉), falls on the 5th day of the 11th lunar month. Instead of switching to Winter Solstice, the method repeats Major Snow's three yuan. It starts Winter Solstice's upper yuan on the 20th, Jia (甲)-Zi (子). Winter Solstice has already begun by then, making this Jieqi carry-over.
Books set different thresholds for a leap round
| Book | How many days early before a leap round? |
|---|---|
| Dunjia Yanyi (遁甲演義) | At 9 days; the same chapter also says 9, 10, or 11 days |
| Yixue Xiangshu Lun, “Chaoshen Jieqi Zhizhi” (易學象數論・超神接氣直指) | 9 days to more than 10 days |
| Qimen Baojian Yuding (奇門寶鑑御定) | Chaoshen should not exceed 10 days and Jieqi carry-over should not exceed 5; the same passage also treats an arrival 7 days early as a leap round |
| Qimen Dunjia Tongzong (奇門遁甲統宗) | Its example from Kangxi's 57th year adds a leap round at Grain in Ear after the lead exceeds 9 days |
The thresholds differ, but the placement agrees: each book puts a leap round after Grain in Ear or Major Snow and before the Summer or Winter Solstice. Qimen Dunjia Tongzong says not to add one at other solar terms, even when the lead reaches 10 days.
8. How I checked the numbers
- I derived all 72 cells of the chart-number table from the 8 palace numbers, then compared each with Wujing Zongyao and Yixue Xiangshu Lun. Apart from the 2 copying differences noted in section 4, they match.
- I built the chart in section 5 with 2 programs I wrote separately. Their results matched.
- Yixue Xiangshu Lun, “Chaoshen Jieqi Zhizhi” includes 2 complete charts, one Yang and one Yin. My programs placed the stars, doors, and spirits in the same positions as the book.
- I compared the 2026 solar-term times with the calendar data from the National Astronomical Observatory of Japan. After conversion to Taipei time, the rounding difference was within 1 minute.
If you want to skip the manual steps, Chengshi: Qimen Timing builds a chart for every two-hour period today and tomorrow. It uses Chaibu by default. You can switch to Zhirun under “Settings → Advanced → Chart Method.” For help reading the full chart, see my introduction to Qimen Dunjia.
9. Common questions
When do Yang Dun and Yin Dun switch?
Yang Dun starts at the Winter Solstice, and Yin Dun starts at the Summer Solstice. Chaibu follows the moment each solar term begins. Zhirun follows its upper-yuan fu tou, which may fall a few days before or after the solstice.
Which method should I use, Chaibu or Zhirun?
Both appear in older books, and both are used today. From 2025 through 2035, their chart numbers differ for 32.7% of two-hour periods. When comparing charts, first check which method was used.
What is a fu tou?
It is the first day of a 5-day span, always a Jia (甲) or Ji (己) day. Its Earthly Branch sets the yuan: Zi (子), Wu (午), Mao (卯), and You (酉) mark the upper yuan; Yin (寅), Shen (申), Si (巳), and Hai (亥) the middle; Chen (辰), Xu (戌), Chou (丑), and Wei (未) the lower.
What are Chaoshen and Jieqi carry-over?
Chaoshen means the upper-yuan fu tou arrives before the solar term. Jieqi carry-over means it arrives after. If both arrive on the same day, the traditional term is Zhengshou (正授).
Why does Qimen Dunjia have only 18 chart numbers?
Yang Dun and Yin Dun each have 9. The year has 72 yuan, and each chart number is used 4 times. Older books describe this as reducing 72 rounds to 18 chart numbers.
