How we calculate
How our BaZi calculator handles true solar time, daylight saving, the Start of Spring and the Zi hour, and how we check it against astronomical data.
From your birth details to four pillars
- Birthplace → coordinates and time zone. You choose a city from about 30,000 (GeoNames, population above 15,000). We use its longitude and its IANA time-zone name, such as America/New_York.
- Clock time → UTC. Your browser's time-zone database converts the local clock time to UTC, including historical daylight saving, such as China's 1986–1991 summer time. If a time was skipped or happened twice when the clocks changed, we ask you which one you mean. For Xinjiang we ask whether your record uses Beijing or Xinjiang time.
- Year and Month pillars. We compare the exact birth instant with the exact instants of the solar terms. The Start of Spring (立春), around February 4, starts the BaZi year. This comparison uses absolute time, so a birth in New York is compared with the same instant in China, not with the New York clock reading.
- Day and Hour pillars. These use local true solar time: UTC + 4 minutes per degree of longitude + the equation of time (Jean Meeus's formula). By default the new day starts at 23:00, the traditional Zi-hour rule; you can switch to midnight.
- Boundary check. If your birth is within two hours of a solar term, in the late Zi hour, or in a two-hour block that changes with true solar time, we calculate the other version and show both.
The 14 edge cases we test every release against
Fictional birth data. "Our chart" uses true solar time and the 23:00 day boundary. The last column is what you get by treating the local clock time as Beijing time without true solar time, a shortcut many tools take; differences are marked.
| Case | What it tests | Birthplace and clock time | Offset | Solar time | Our chart (Y M D H) | Day starts at midnight | Clock read as Beijing time |
|---|---|---|---|---|---|---|---|
| C01 | Between the Start of Spring and Chinese New Year | Beijing 2000-02-04 22:00 | UTC+8 | 02-04 21:31 | Gēng Chén, Wù Yín, Rén Chén, Xīn Hài | same | Gēng Chén, Wù Yín, Rén Chén, Xīn Hài |
| C02 | True solar time in a city far from its zone meridian | Perth 2000-07-10 13:15 | UTC+8 | 07-10 12:53 | Gēng Chén, Guǐ Wèi, Jǐ Sì, Gēng Wǔ | same | Gēng Chén, Guǐ Wèi, Jǐ Sì, Xīn Wèi differs |
| C03 | Late Zi hour (23:00–24:00) | Shanghai 1998-03-10 23:30 | UTC+8 | 03-10 23:25 | Wù Yín, Yǐ Mǎo, Dīng Sì, Gēng Zǐ | Wù Yín, Yǐ Mǎo, Bǐng Chén, Gēng Zǐ | Wù Yín, Yǐ Mǎo, Dīng Sì, Gēng Zǐ |
| C04 | China daylight saving time, 1988 | Beijing 1988-07-01 09:10 | UTC+9 | 07-01 07:51 | Wù Chén, Wù Wǔ, Dīng Sì, Jiǎ Chén | same | Wù Chén, Wù Wǔ, Dīng Sì, Yǐ Sì differs |
| C05 | Repeated hour when daylight saving ended (first) | Beijing 1988-09-11 01:30 | UTC+9 | 09-11 00:18 | Wù Chén, Xīn Yǒu, Jǐ Sì, Jiǎ Zǐ | same | Wù Chén, Xīn Yǒu, Jǐ Sì, Yǐ Chǒu differs |
| C05b | Repeated hour when daylight saving ended (second) | Beijing 1988-09-11 01:30 | UTC+8 | 09-11 01:18 | Wù Chén, Xīn Yǒu, Jǐ Sì, Yǐ Chǒu | same | Wù Chén, Xīn Yǒu, Jǐ Sì, Yǐ Chǒu |
| C06 | Born abroad just after the Start of Spring | New York 2000-02-04 10:00 | UTC−5 | 02-04 09:50 | Gēng Chén, Wù Yín, Rén Chén, Yǐ Sì | same | Jǐ Mǎo, Dīng Chǒu, Rén Chén, Yǐ Sì differs |
| C07 | One minute from a solar term | Beijing 2024-05-05 08:09 | UTC+8 | 05-05 07:57 | Jiǎ Chén, Wù Chén, Jǐ Sì, Wù Chén | same | Jiǎ Chén, Wù Chén, Jǐ Sì, Wù Chén |
| C08 | Xinjiang, recorded in Beijing time | Ürümqi 1990-07-01 12:00 | UTC+9 | 07-01 08:46 | Gēng Wǔ, Rén Wǔ, Dīng Mǎo, Jiǎ Chén | same | Gēng Wǔ, Rén Wǔ, Dīng Mǎo, Bǐng Wǔ differs |
| C08b | Xinjiang, recorded in Xinjiang time | Ürümqi 1990-07-01 12:00 | UTC+6 | 07-01 11:46 | Gēng Wǔ, Rén Wǔ, Dīng Mǎo, Bǐng Wǔ | same | Gēng Wǔ, Rén Wǔ, Dīng Mǎo, Bǐng Wǔ |
| C09 | Southern-hemisphere daylight saving | Sydney 2000-01-10 12:00 | UTC+11 | 01-10 10:57 | Jǐ Mǎo, Dīng Chǒu, Dīng Mǎo, Yǐ Sì | same | Jǐ Mǎo, Dīng Chǒu, Dīng Mǎo, Bǐng Wǔ differs |
| C10 | True solar time falls on the previous day | Auckland 2000-01-01 00:30 | UTC+13 | 12-31 23:06 | Jǐ Mǎo, Bǐng Zǐ, Wù Wǔ, Rén Zǐ | Jǐ Mǎo, Bǐng Zǐ, Dīng Sì, Rén Zǐ | Jǐ Mǎo, Bǐng Zǐ, Wù Wǔ, Rén Zǐ |
| C11 | Daylight saving before 1970 | Shanghai 1945-07-01 12:00 | UTC+9 | 07-01 11:02 | Yǐ Yǒu, Rén Wǔ, Xīn Wèi, Jiǎ Wǔ | same | Yǐ Yǒu, Rén Wǔ, Xīn Wèi, Jiǎ Wǔ |
| C12 | UTC+7:30, used in Singapore before 1982 | Singapore 1980-01-01 12:00 | UTC+7:30 | 01-01 11:22 | Jǐ Wèi, Bǐng Zǐ, Guǐ Yǒu, Wù Wǔ | same | Jǐ Wèi, Bǐng Zǐ, Guǐ Yǒu, Wù Wǔ |
How we verify
We don't use another BaZi website as the answer key. Reference solar terms come from PyEphem: the moment the sun's apparent longitude reaches each multiple of 15°. Reference pillars come from an independent implementation: day pillars counted from a known anchor day, month stems from the Five Tigers rule and hour stems from the Five Rats rule. Our production code, based on the open-source lunar-javascript library, is then compared item by item.
The two methods agree to within 57 seconds on every solar term from 1900 to 2100 (median 9.5 seconds). Four of the 30,000 random birth moments fell within two minutes of a solar term and were set aside by design: for births that close, we show both possible charts rather than pretend to a precision the birth record doesn't have.
Conventions and defaults
| Question | Our default | Other common practice |
|---|---|---|
| When does the year start? | Start of Spring, to the minute | Chinese New Year. We explain the difference when it affects you. |
| When does the day start? | 23:00 (start of the Zi hour) | Midnight. Switch with one toggle; births 23:00–24:00 show both. |
| Solar time | True solar time for your city | Clock time. The result shows the difference in minutes. |
| Daylight saving | Detected automatically | Ticked by hand on some sites |
| Luck Pillar start age | Calculated to the minute | Estimated from days (3 days = 1 year) |
| Kua number year | Start of Spring | January 1 or Chinese New Year |
| Kua number 5 | 2 for men, 8 for women | Varies by school |
Limits worth knowing
- Your recorded birth time matters most. A birth certificate rounded to the nearest 5 or 15 minutes can move the Hour pillar, and near a solar term, the Month pillar. That's why we flag boundary cases instead of hiding them.
- Time zones before 1970 can be incomplete in browser data for some places. We show the UTC offset we used so you can check it.
- Small towns: choose the nearest large city. One degree of longitude changes solar time by 4 minutes, and we show the longitude used.
Sources
- lunar-javascript (6tail, MIT license): solar terms and sexagenary cycle.
- PyEphem: independent solar-term reference.
- Jean Meeus, Astronomical Algorithms: equation of time.
- IANA time zone database, via your browser.
- GeoNames cities15000 (CC BY 4.0).
Last updated