How Qimena Casts a Qi Men Chart: Rules, Worked Example and Verification

Published · Last updated

A Qimena chart is not “generated”; it is calculated by fixed rules, step by step, so the same time and place always give the same chart. This page publishes each rule, a worked example you can check by hand, and how our results compare with authoritative data, so you can check us.

What we checked

ItemHow it was checkedResult
Solar-term instantsAll 72 terms in 2026–2028 compared with the Hong Kong Observatory’s published timesAll within 1 minute (the Observatory publishes to the minute); the engine’s table is also compared with the independent astronomy-engine library over the 4,824 terms of 1900–2100, largest gap 1.0 min
Day pillar73,414 days from 1900 to 2100 compared with an independent Julian Day formula, in 5 time zones; plus 1949-10-01 (Jia Zi) and 2000-01-01 (Wu Wu)Zero mismatches
Four pillars vs an open-source calendar library3,000 random moments from 1950 to 2049 (UTC+8, middle of each double-hour) compared with the BaZi from the open-source lunar-javascript library (2026-10-03)2,968 identical; the other 32 differ only in the hour pillar, all during China’s 1986–1991 daylight saving years: we remove DST using that year’s real UTC offset, while the library takes the clock time as is
Ju tableThe 72 ju numbers (24 terms × three yuan) reviewed line by line against the traditional mnemonic tableMatch
Full chart vs independent software56 moments (16 solar-term boundaries and special cases + 40 random) compared palace by palace with china95.net (rotating plate + Chai Bu)all 56 returned, 49 identical, 7 different, each traced to the other site’s solar-term or month rules; the comparison also exposed and fixed an error of our own in the eight deities

The rules, step by step

  1. Fix the time. Take the exact moment of casting and convert it to the True Solar Time of the place: True Solar Time = the moment + the longitude offset + the equation of time, where the longitude offset is “longitude × 4 minutes − the time zone offset” and the equation of time comes from a standard approximation for that date (how it works). The time zone and daylight saving time come from the zone’s rules, so you never convert to Beijing time.
  2. Four pillars. The year and month pillars come from the sun’s ecliptic longitude at the absolute moment: the year changes at Li Chun (longitude 315°), each month spans 30° from Li Chun, and the month stem follows the Five Tigers rule. The day and hour pillars use True Solar Time: the day pillar follows the continuous 60-day cycle (anchored on 2000-01-01, a Wu Wu day) and changes at 23:00 True Solar Time (the whole Zi hour belongs to the next day); the hour pillar is one of twelve two-hour periods (23:00–01:00 is Zi), with the stem from the Five Rats rule.
  3. Solar term and ju (Chai Bu). The sun’s longitude divides the year into 24 solar terms of 15° each. From Winter Solstice through Grain in Ear (12 terms) the chart is Yang Dun; from Summer Solstice through Major Snow it is Yin Dun. The yuan (upper, middle, lower) comes from the branch of the day’s leading Jia or Ji day: Zi, Wu, Mao, You are upper; Yin, Shen, Si, Hai middle; Chen, Xu, Chou, Wei lower. The ju number then comes from the traditional table by “solar term × yuan.”
  4. Earth Plate. Place Wu, Ji, Geng, Xin, Ren, Gui, Ding, Bing, Yi in order through the nine palaces starting at the ju’s palace: forward through the palace numbers in Yang Dun, backward in Yin Dun.
  5. Xun head, Chief Star and Chief Door. The hour pillar’s decade (Jia Zi, Jia Xu, Jia Shen, Jia Wu, Jia Chen, Jia Yin) sets the xun head, whose Jia hides beneath Wu, Ji, Geng, Xin, Ren or Gui. The palace where that hidden stem sits on the Earth Plate gives its home star as the Chief Star and its home door as the Chief Door.
  6. Heaven Plate (nine stars, rotating plate). The stars turn as one ring so the Chief Star lands on the palace of the hour stem on the Earth Plate (the hidden stem if the hour stem is Jia); each star carries the Earth stem of its home palace with it.
  7. Human Plate (eight doors). The Chief Door starts at the xun head’s palace and walks through palaces 1 to 9, forward in Yang Dun and backward in Yin Dun, as many steps as the hour is from the xun head; the doors turn as one ring so the Chief Door lands there.
  8. Spirit Plate (eight deities). The Chief deity sits with the Chief Star, and the other seven follow around the eight palaces: clockwise in Yang Dun and counterclockwise in Yin Dun.
  9. Center palace. No star or door is placed there of its own; Tian Qin lodges in Kun 2. When the xun head falls in the center, the Chief Star is recorded as Tian Qin and the Chief Door as the Death Door, and the chart is laid out from Kun 2.
  10. Voids, punishment, pressed doors, strength and patterns. Mark the palaces of the two void branches of the decade, and the palaces with a punished instrument stem or a pressed door; mark each palace prosperous, assisting, resting, confined or dead by the season of the month branch; and detect patterns such as the Five Non-Encounters Hour, Fu Yin and Fan Yin (pattern glossary).

Worked example: 6 February 2027, 10:00 a.m., Shanghai (121.47° E)

Step 1, time. Shanghai time 10:00, longitude offset +5.9 minutes and equation of time about −14.3 minutes, so True Solar Time is about 09:51.

Step 2, four pillars. Li Chun arrived on 4 February 2027 at 09:46 Hong Kong time, so the year pillar is Ding Wei. It is a Yin (tiger) month, and a Ding year starts its months on Ren, so the month pillar is Ren Yin. The day pillar is Bing Chen. True Solar Time 09:51 is the Si hour, and on a Bing day the Si hour is Gui Si.

Step 3, ju. The sun’s longitude is about 317°, in the Start of Spring term, so it is Yang Dun. The leading day of Bing Chen is Jia Yin, and Yin belongs to the middle yuan. The Start of Spring row reads 8, 5, 2, and the middle yuan takes 5: Yang Dun ju 5.

Step 4, Earth Plate. Starting at palace 5 and going forward: Wu 5, Ji 6, Geng 7, Xin 8, Ren 9, Gui 1, Ding 2, Bing 3, Yi 4.

Step 5, Chief Star and Chief Door. Gui Si belongs to the Jia Shen decade, whose head Jia Shen hides beneath Geng. Geng sits in palace 7 (Dui), so the Chief Star is Dui’s home star, Tian Zhu, and the Chief Door is Dui’s home door, the Fright Door.

Step 6, Heaven Plate. The hour stem Gui sits in palace 1 (Kan) on the Earth Plate, so the Chief Star Tian Zhu turns to Kan 1, carrying Geng, the Earth stem of its home palace, Dui 7.

Step 7, Human Plate. Gui Si is nine hours after Jia Shen, so the Chief Door walks nine steps from palace 7 and comes all the way around to palace 7: the Fright Door stays in Dui 7.

Step 8, Spirit Plate. The Chief deity sits with Tian Zhu in Kan 1 and the others follow clockwise: Soaring Serpent in Gen 8, Great Yin in Zhen 3, Six Harmony in Xun 4, White Tiger in Li 9, Black Tortoise in Kun 2, Nine Earth in Dui 7 and Nine Heaven in Qian 6.

Step 9, voids. The Jia Shen decade’s void branches are Wu and Wei, which fall in Li 9 and Kun 2.

The board our engine produces matches this derivation exactly:

Xun 4Li 9 (void)Kun 2 (void)
Heaven Xin / Earth Yi
Tian Ren · Block Door · Six Harmony
Heaven Bing / Earth Ren
Tian Chong · Scenery Door · White Tiger
Heaven Yi / Earth Ding
Tian Fu · Death Door · Black Tortoise
Zhen 3Center 5Dui 7
Heaven Gui / Earth Bing
Tian Peng · Harm Door · Great Yin
Earth Wu
(Tian Qin lodges in Kun 2)
Heaven Ren / Earth Geng
Tian Ying · Fright Door · Nine Earth
Gen 8Kan 1Qian 6
Heaven Ji / Earth Xin
Tian Xin · Life Door · Soaring Serpent
Heaven Geng / Earth Gui
Tian Zhu · Rest Door · Chief
Heaven Ding / Earth Ji
Tian Rui · Open Door · Nine Heaven

No whole-chart or palace-level pattern is triggered for this chart.

Our solar terms against the Hong Kong Observatory (2027)

The Hong Kong Observatory publishes exact solar-term instants each year, based on data from HM Nautical Almanac Office and the US Naval Observatory. The table compares its 2027 times with the instants our engine computes (a positive difference means our engine is later):

Solar termHKO official (HKT)Qimena engine (HKT)Difference (min)
Minor Cold (小寒)1/5 22:101/5 22:10+0.0
Major Cold (大寒)1/20 15:301/20 15:30+0.0
Start of Spring (立春)2/4 09:462/4 09:46+0.0
Rain Water (雨水)2/19 05:332/19 05:33+0.0
Awakening of Insects (惊蛰)3/6 03:403/6 03:40+0.0
Spring Equinox (春分)3/21 04:253/21 04:25+0.0
Clear and Bright (清明)4/5 08:174/5 08:18+1.0
Grain Rain (谷雨)4/20 15:184/20 15:18+0.0
Start of Summer (立夏)5/6 01:255/6 01:25+0.0
Grain Buds (小满)5/21 14:185/21 14:18+0.0
Grain in Ear (芒种)6/6 05:266/6 05:26+0.0
Summer Solstice (夏至)6/21 22:116/21 22:11+0.0
Minor Heat (小暑)7/7 15:377/7 15:37+0.0
Major Heat (大暑)7/23 09:057/23 09:05+0.0
Start of Autumn (立秋)8/8 01:278/8 01:27+0.0
End of Heat (处暑)8/23 16:148/23 16:14+0.0
White Dew (白露)9/8 04:289/8 04:28+0.0
Autumn Equinox (秋分)9/23 14:029/23 14:02+0.0
Cold Dew (寒露)10/8 20:1710/8 20:17+0.0
Frost’s Descent (霜降)10/23 23:3310/23 23:33+0.0
Start of Winter (立冬)11/7 23:3911/7 23:39+0.0
Minor Snow (小雪)11/22 21:1611/22 21:16+0.0
Major Snow (大雪)12/7 16:3812/7 16:38+0.0
Winter Solstice (冬至)12/22 10:4212/22 10:42+0.0

Across all 72 terms in 2026–2028: largest gap 1 minute, average absolute gap 0.03 minutes. The Li Chun gaps for the three years, in minutes, are 2026: +0.0, 2027: +0.0, 2028: +0.0. Note that the engine now uses a precomputed table of solar-term instants, so agreement with the Observatory is expected and is not an independent check; the independent check is a comparison of the table’s 4,824 terms for 1900–2100 with a second library, astronomy-engine: largest gap 1.0 minute. Source: Hong Kong Observatory.

A full-board comparison with another charting site

We chose china95.net (元亨利贞网) as an independent check because it also offers “rotating plate + Chai Bu” and lets you pick any time. For the comparison our engine skipped True Solar Time and cast at the Beijing civil time, as that site does, and then compared the four pillars, the ju, the Chief Star and Chief Door, and for each of the eight outer palaces the Heaven stem, Earth stem, star, door and deity. The comparison was run around 1 October 2026.

GroupMoments queriedReturnedIdenticalDifferent
Random moments (2000–2029, odd hours)4040391
Solar-term boundaries and special cases1616106
Total5656497

The comparison exposed an error of our own, now fixed. In five charts the ju, stars, doors and stems all agreed and only the ring of eight deities was out of place. The cause: when the xun head falls in the center palace the Chief Star is Tian Qin, which turns with Tian Rui, but the engine always put the Chief deity in Kun 2. After the fix those five charts match the other site exactly. The affected share is not small: over the 4,380 two-hour charts of 2027, about 8.0% (350) were affected.

The 7 that differ all trace back to the other site:

  • 2027-02-04 09:40 and 09:55 (around Li Chun) and 2026-12-22 05:30 (after the Winter Solstice): the other site changes the ju later than we do. For Li Chun, its page prints 10:06 while the Hong Kong Observatory publishes 09:46, twenty minutes earlier; at 09:40 its year and month pillars already showed Ding Wei and Ren Yin (counted from the day of Li Chun) while Li Chun is actually at 09:46 and ours still read Bing Wu year and Xin Chou month, so only the year and month pillars differ there and the ju is Major Cold on both sides; at 09:55 its year and month pillars have changed in the same way while its ju was still the pre-Li Chun Major Cold, so it is not consistent with itself. The Winter Solstice case was rechecked on 2026-10-03: that site prints the solstice at 05:52 on December 22 while the Hong Kong Observatory publishes 04:50, about an hour later (it also prints Major Snow at 12:08 against the Observatory’s 10:53); after its own solstice time (at 09:30) both sides give Yang Dun Ju 7, identical. We follow the Hong Kong Observatory.
  • 2000-01-01, 2024-01-03, 2027-01-03 and 2027-01-05: the other site’s month pillar has already changed to the Chou month in early January, but Minor Cold, the boundary between the Zi and Chou months, fell on 6 January in 2000 and 2024 and falls on 5 January at 22:10 in 2027, so all four moments are still in the Zi month, and our result is the correct one.

The other site also gave the same day and hour pillars at 23:30 on 2027-03-10 and 00:30 the next day, which shows it changes the day at 23:00 as we do. We did not review that site’s solar-term table line by line, and we compared against this one site only; if another tool disagrees with us, please tell us.

Conventions and known limits

  • Solar-term instants come from a precomputed table. The 4,824 instants for 1900–2100 are generated with the open-source calendar library tyme4ts (MIT, after the sxwnl almanac algorithm) to the minute; all 72 terms of 2026–2028 are within 1 minute of the Hong Kong Observatory, and the table agrees with the independent astronomy-engine library to within 1.0 minute. If you cast within a minute of a boundary, the year pillar, month pillar and ju number may still differ from the almanac. Before 1900 and after 2100 the engine falls back to a low-precision solar position formula, which can be off by up to about 22 minutes.
  • The day changes at 23:00 True Solar Time (Zi-start day change). The whole Zi hour (23:00–01:00) belongs to the next day, and both the day pillar and the hour stem come from that day. This is the mainstream practice in BaZi and Qi Men software today; a second school, the “night Zi hour does not change the day” school, changes the day at 00:00, so its charts for the late Zi hour (23:00–24:00) will differ from ours. In the birth-chart hour picker, Zi is read as 00:00–01:00 of the chosen date, so for someone born after 23:00, enter the next day’s date.
  • Longitude only, not latitude. The place sets True Solar Time through its longitude.
  • Birth times can be converted automatically. Under the birth hour on the form, “Convert it from your birthplace” takes the clock time and the birthplace time zone (and the birth longitude on the form). If you skip it, the picker takes the double-hour you choose as is, so convert it yourself first (how to convert it).
  • School. Chai Bu to set the ju and the rotating plate to lay out the chart (why we chose them). Software using Zhi Run or the flying plate will give different charts, and that does not mean either one is wrong.
  • Third-party comparison data. Jade Almanac publishes an open (CC0) dataset comparing 8 BaZi calculators across 77 outputs, covering four common conventions: where the year starts, where the day rolls over, true solar time and daylight saving. Its test cases read the clock literally, with no birth city, which differs from how this page corrects for the birthplace, so keep that in mind when comparing. View the dataset

Corrections log

  • 2026-10-13: Solar-term instants now come from a precomputed table (1900–2100, generated with the open-source library tyme4ts) instead of a low-precision formula that could be off by up to about 22 minutes against that table. In a random sample of 20,000 moments about 0.015% of charts changed (year pillar, month pillar or ju), all within a few minutes of a solar-term boundary.

  • 2026-10-13: the whole-chart comparison now covers 56 moments (three more around Minor Cold), and the solar-term comparison, the ju table and the whole-chart comparison are published as a CC0 dataset on the open data page.

  • 2026-10-01: Eight deities out of place. When the xun head falls in the center palace (the Chief Star is Tian Qin), the Chief deity used to be fixed in Kun 2; it now follows the palace where Tian Rui lands. Over the 4,380 two-hour charts of 2027, about 8.0% (350) had the whole deity ring misplaced, and the deities quoted in AI readings were wrong with it. Fixed, and checked against five comparison charts from china95.net.

  • 2026-09-29: The day pillar now changes at 23:00 True Solar Time (Zi-start day change) instead of 00:00, so the late Zi hour no longer takes the same day’s pillar and stem.

  • 2026-09-29: Fu Yin and Fan Yin used to test only the doors; both the stars and the doors must now match. Over the 4,380 two-hour charts of 2027, Fu Yin flags fell from 973 to 543 and Fan Yin flags from 488 to 83.

  • 2026-09-25: The birth-chart year pillar now changes at Li Chun, and a bug that read birth dates as the previous day for users in the Americas was fixed.

Want to check for yourself?

In the free AI charting tool, choose “Choose date & time,” enter the time and place of the example above, and compare the board with this page. If another tool gives you a different result, send us the software name, time, place and the difference at [email protected]; we will check each one and add the outcome to this page.

FAQ

How accurate are Qimena's solar terms?

We compared the solar-term instants our engine computes with the Hong Kong Observatory's published times for all 72 terms in 2026–2028. Every one is within 1 minute (the Observatory publishes to the minute). The engine uses a precomputed table of solar-term instants (1900–2100, generated with the open-source calendar library tyme4ts), so matching the Observatory is expected; the independent check is that we compared the table's 4,824 terms with a second astronomy library, astronomy-engine: largest gap 1.0 minute, average 0.2. Within 1 minute of a boundary, the year pillar, month pillar and ju number may still differ from the almanac.

How was the day pillar checked?

We checked every day from 1900 to 2100 (73,414 days) against an independent Julian Day Number formula, in five different time zones, with no mismatches, and confirmed two known dates: 1 October 1949 is a Jia Zi day and 1 January 2000 is a Wu Wu day.

Has the full chart been compared with other software?

Yes. We compared 56 moments with china95.net (rotating plate + Chai Bu). In 49 of them the ju, Chief Star and Chief Door, and the stems, star, door and deity in every palace are identical. The other 7 differ because of the other site's solar-term or month rules. The comparison also found and fixed an error of our own in the eight deities.