ClearBaZi

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.

4,824solar terms 1900–2100 checked; all within 1 minute of an independent astronomical calculation
0mismatches in 59,996 pillar comparisons (30,000 random birth moments, both day-boundary rules)
0mismatches in 3,000 Luck Pillar directions and first pillars, male and female
≤ 4 serror of our equation-of-time formula, used for true solar time

From your birth details to four pillars

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

CaseWhat it testsBirthplace and clock timeOffsetSolar timeOur chart (Y M D H)Day starts at midnightClock read as Beijing time
C01Between the Start of Spring and Chinese New YearBeijing
2000-02-04 22:00
UTC+802-04 21:31Gēng Chén, Wù Yín, Rén Chén, Xīn HàisameGēng Chén, Wù Yín, Rén Chén, Xīn Hài
C02True solar time in a city far from its zone meridianPerth
2000-07-10 13:15
UTC+807-10 12:53Gēng Chén, Guǐ Wèi, Jǐ Sì, Gēng WǔsameGēng Chén, Guǐ Wèi, Jǐ Sì, Xīn Wèi differs
C03Late Zi hour (23:00–24:00)Shanghai
1998-03-10 23:30
UTC+803-10 23:25Wù 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ǐ
C04China daylight saving time, 1988Beijing
1988-07-01 09:10
UTC+907-01 07:51Wù Chén, Wù Wǔ, Dīng Sì, Jiǎ ChénsameWù Chén, Wù Wǔ, Dīng Sì, Yǐ Sì differs
C05Repeated hour when daylight saving ended (first)Beijing
1988-09-11 01:30
UTC+909-11 00:18Wù Chén, Xīn Yǒu, Jǐ Sì, Jiǎ ZǐsameWù Chén, Xīn Yǒu, Jǐ Sì, Yǐ Chǒu differs
C05bRepeated hour when daylight saving ended (second)Beijing
1988-09-11 01:30
UTC+809-11 01:18Wù Chén, Xīn Yǒu, Jǐ Sì, Yǐ ChǒusameWù Chén, Xīn Yǒu, Jǐ Sì, Yǐ Chǒu
C06Born abroad just after the Start of SpringNew York
2000-02-04 10:00
UTC−502-04 09:50Gēng Chén, Wù Yín, Rén Chén, Yǐ SìsameJǐ Mǎo, Dīng Chǒu, Rén Chén, Yǐ Sì differs
C07One minute from a solar termBeijing
2024-05-05 08:09
UTC+805-05 07:57Jiǎ Chén, Wù Chén, Jǐ Sì, Wù ChénsameJiǎ Chén, Wù Chén, Jǐ Sì, Wù Chén
C08Xinjiang, recorded in Beijing timeÜrümqi
1990-07-01 12:00
UTC+907-01 08:46Gēng Wǔ, Rén Wǔ, Dīng Mǎo, Jiǎ ChénsameGēng Wǔ, Rén Wǔ, Dīng Mǎo, Bǐng Wǔ differs
C08bXinjiang, recorded in Xinjiang timeÜrümqi
1990-07-01 12:00
UTC+607-01 11:46Gēng Wǔ, Rén Wǔ, Dīng Mǎo, Bǐng WǔsameGēng Wǔ, Rén Wǔ, Dīng Mǎo, Bǐng Wǔ
C09Southern-hemisphere daylight savingSydney
2000-01-10 12:00
UTC+1101-10 10:57Jǐ Mǎo, Dīng Chǒu, Dīng Mǎo, Yǐ SìsameJǐ Mǎo, Dīng Chǒu, Dīng Mǎo, Bǐng Wǔ differs
C10True solar time falls on the previous dayAuckland
2000-01-01 00:30
UTC+1312-31 23:06Jǐ 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ǐ
C11Daylight saving before 1970Shanghai
1945-07-01 12:00
UTC+907-01 11:02Yǐ Yǒu, Rén Wǔ, Xīn Wèi, Jiǎ WǔsameYǐ Yǒu, Rén Wǔ, Xīn Wèi, Jiǎ Wǔ
C12UTC+7:30, used in Singapore before 1982Singapore
1980-01-01 12:00
UTC+7:3001-01 11:22Jǐ Wèi, Bǐng Zǐ, Guǐ Yǒu, Wù WǔsameJǐ 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

QuestionOur defaultOther common practice
When does the year start?Start of Spring, to the minuteChinese 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 timeTrue solar time for your cityClock time. The result shows the difference in minutes.
Daylight savingDetected automaticallyTicked by hand on some sites
Luck Pillar start ageCalculated to the minuteEstimated from days (3 days = 1 year)
Kua number yearStart of SpringJanuary 1 or Chinese New Year
Kua number 52 for men, 8 for womenVaries 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

Last updated