4 Pillar Calculator
Enter the recorded birth date, time and birthplace to calculate the Year, Month, Day and Hour pillars. Then check the clock and day-boundary setting: a birth at 23:30 can have a different Day pillar under the 23:00 and midnight conventions. This page shows the actual outputs, not a claim that one convention predicts your life.
Calculate your four pillars
Your chart
EXAMPLEDAY MASTER
Five Elements
Hidden stems & Ten Gods +
Na Yin, growth phases & voids +
Luck cycles
Year-by-year pillars +
A FEW THINGS TO NOTICE
Rule-based reflections, not predictions. No AI is used.
See how your time became this chart +
Check the columns in this order
- Read the recorded local time, historical UTC offset and UTC instant in the calculation receipt.
- Check Year and Month against the solar-term basis.
- Check the selected clock and day boundary for Day and Hour.
This calculator does not derive all four columns from one interchangeable date label. Its bundled engine evaluates Year and Month using the resolved instant in the library’s UTC+08 solar-term basis. It evaluates Day and Hour from the local civil clock, or from the adjusted clock when true solar time is enabled. The day-boundary option changes the local EightChar setting. These are implementation choices you can inspect in calculation code.
A controlled late-night example
Our synthetic record is March 20, 2024 at 23:30 in Asia/Shanghai, longitude 120° east, Gregorian calendar, known time and true solar time OFF. Sex is set to male; it is held constant rather than used to explain a pillar difference. Both day-boundary runs resolve to March 20 at 15:30 UTC. Only the boundary selector changes. Full inputs are recorded in the six-case test ledger.
With the midnight convention, the four pillars are Jia Chen / Ding Mao / Gui Wei / Jia Zi. With the 23:00 convention they are Jia Chen / Ding Mao / Jia Shen / Jia Zi. The Year and Month are unchanged, and the Hour label is also unchanged in this pair. Only the Day changes. This is a direct comparison of our two runs, not a general promise that changing Day must always leave Hour unchanged. six-case test ledger.
| Case | Local clock / day boundary | Year | Month | Day | Hour |
|---|---|---|---|---|---|
| midnight-rule | 2024-03-20 23:30 / 00:00 | Jia Chen | Ding Mao | Gui Wei | Jia Zi |
| zi-rule | 2024-03-20 23:30 / 23:00 | Jia Chen | Ding Mao | Jia Shen | Jia Zi |
| next-midnight | 2024-03-21 00:30 / 00:00 | Jia Chen | Ding Mao | Jia Shen | Jia Zi |
| before-hour-boundary | 2024-03-20 22:59 / 00:00 | Jia Chen | Ding Mao | Gui Wei | Gui Hai |
| after-hour-boundary | 2024-03-20 23:01 / 00:00 | Jia Chen | Ding Mao | Gui Wei | Jia Zi |
| unknown-hour | 2024-03-20 12:00 (noon reference only) / 00:00 | Jia Chen | Ding Mao | Gui Wei | Not supplied |
The next-midnight run uses March 21 at 00:30 under the midnight convention. Its Day is Jia Shen, matching the 23:00-convention Day from the previous written date. Its UTC time is 16:30, so it is not the same physical instant as the 23:30 record. The comparison checks which written day a convention assigns; it does not make the two births equivalent. six-case test ledger.
The Hour boundary is a separate check
Our 22:59 and 23:01 runs both use the midnight convention on March 20. They return the same Day, Gui Wei, but Hour changes from Gui Hai to Jia Zi. Year and Month remain Jia Chen and Ding Mao. This isolates an Hour transition without changing the chosen day rule; do not use a changed Hour label alone to infer that the Day must also have rolled over. six-case test ledger.
The 23:30 pair answers a different question from the 22:59/23:01 pair. One holds the instant fixed and changes a rule; the other holds the rule fixed and changes the recorded minute. Mixing both operations in one comparison prevents you from identifying the cause of a difference. Keeping the two pairs separate makes the changed field visible in the six-case test ledger.
What if the birth hour is missing?
For the unknown-hour run, the interface omits the Hour pillar rather than silently treating noon as the recovered birth time. On our March 20 synthetic date, the three supplied pillars are Jia Chen / Ding Mao / Gui Wei, and the sampled three-pillar set has one entry. The 12:00 value in the raw record is a reference only. This stable sample does not establish that every missing-hour birth is stable. six-case test ledger.
The unknown-time routine samples the date every thirty minutes, not every possible second. A short interval around a term or clock boundary can therefore require more careful investigation than this sampling alone provides. Use the separate unknown birth time guide for the limits, rather than inventing an Hour pillar to make the chart look complete. Source: calculation code.
What should I enter if my birthplace is missing from a Bazi calculator?
Use the custom-place option and provide the IANA time-zone name and east-positive longitude for the place and birth date. In this calculator the city menu fills those fields; it is not an additional astrological input. For the controlled example, choosing a custom place and entering Asia/Shanghai and 120 preserves the same settings used in the ledger. You do not need to substitute the nearest listed city just to submit the form. Source: calculation code and six-case test ledger.
Which calculator should I trust near a boundary?
Prefer a result you can audit: recorded local time, UTC offset, resolved instant, solar-time switch and day rule should be visible. Agreement on the final characters is useful, but it does not identify which conversion was applied. Our answer to the reader’s calculator-selection question provides the shared clock check. The new late-night ledger here tests a different controlled input. Source: calculation code.
Reading the chart is the next task
After verifying how the four pillars were calculated, use the bazi chart guide to locate Day Master, hidden stems and Ten Gods. Those labels explain the displayed chart structure; they do not independently verify the birth record or establish predictions. This calculator’s interpretation notes use fixed local rules. There is no online AI reading request in the calculation path. Source: calculation code.
Range, calendar and reproducibility
The supported input years are 1900–2100. Gregorian input and Chinese lunar input are separate form choices; lunar leap-month status must be supplied when applicable. The same bundled lunar-javascript 1.7.7 library used by the main calculator supplies calendar and Four Pillars routines. This page reuses that file without changing its algorithm. See the library project, calculation code and the ledger’s engine hash.
A reproducible comparison needs the input values and the runtime’s time-zone data, not just a screenshot of the finished chart. Our ledger records Node, ICU and time-zone data versions along with the synthetic inputs. A browser can contain a different historical zone database. Keep uncertainty visible when checking old dates, and distinguish a successful code comparison from an independent validation of traditional interpretation. Source: six-case test ledger.
The three-minute time check
Enter the same synthetic date, recorded time, time zone and longitude, check the historical UTC offset and UTC instant, then toggle solar time and compare the Day and Hour results with the linked eight-case ledger.
- Time zone. Keep the recorded local clock time and select the birth-place zone for that date. Record the historical UTC offset and resolved UTC instant. Time-zone reference.
- Daylight saving. Check whether the named zone has already included the seasonal offset; do not subtract it again. US DST reference and our tested offset pairs.
- Solar time. Hold the inputs fixed, switch solar time off and on, then record the pillar clock and Day/Hour results. In this calculator that switch changes the selected clock, not the resolved UTC instant. Solar-time formula and our measured cases.
Read the worked answer and eight-case ledger ↗Find related time-setting pages ↗