Quick answer. The Bazi engine takes one input — your exact birth moment — and computes the Year, Month, Day, and Hour pillars, each holding one of ten Heavenly Stems (天干) and one of twelve Earthly Branches (地支). From those eight characters it derives your Day Master (日主), the hidden stems lurking in each branch, the Ten Gods relationships, and the timing of the Luck Pillars (大运) that govern each decade. The astronomy is exact; the interpretation is the practitioner's craft.
The Eight Characters — Bā Zì
Bazi literally means eight characters. The system takes your birth moment and renders it as a 4×2 grid: four time pillars (Year, Month, Day, Hour) and two characters per pillar (one Heavenly Stem, one Earthly Branch). The characters are chosen from the same sexagenary cycle (六十甲子) the Chinese calendar has used for over three thousand years.
The full grid for someone born on, say, 15 June 1990 at 14:30 in Shanghai might look like this:
| Pillar | Stem (天干) | Branch (地支) | Element of stem |
|---|---|---|---|
| Year | 庚 Gēng | 午 Wǔ | Yang Metal |
| Month | 壬 Rén | 午 Wǔ | Yang Water |
| Day | 丁 Dīng | 未 Wèi | Yin Fire ← Day Master |
| Hour | 丁 Dīng | 未 Wèi | Yin Fire |
That single grid encodes more information than it looks. The Day stem (here 丁 Yin Fire) becomes the Day Master — the chart's I, the reference point against which everything else is measured. The branches each carry hidden stems. The relationships between the eight characters and the Day Master become the Ten Gods. The pillars themselves are sequenced into Luck Pillars that move through the decades of the life. The engine derives all of this from one input: a moment in time at a place on Earth.
Solar Terms — Why Calendar Months Don't Apply
The first thing a working Bazi practitioner has to internalise: the Bazi calendar does not use the Gregorian month, the lunar month, or the solar year boundary you might expect. It uses the 24 solar terms (二十四节气) — twenty-four points in the Sun's apparent path along the ecliptic, each fifteen degrees apart.
These solar terms anchor everything. The Bazi year does not begin on January 1 or even on the lunar new year. It begins at Lichun (立春), the start of spring, which falls on or near February 4 each year — the moment the Sun reaches 315° celestial longitude. Similarly, the Bazi month does not begin on the first of any calendar month; it begins at one of the twelve "section-starting" solar terms (节, jié), each of which marks the Sun crossing a 30° boundary.
The twelve month-starting terms:
- Lichun (立春, ~Feb 4) — Sun at 315° → begins the 寅 Yín month (Tiger)
- Jingzhe (惊蛰, ~Mar 6) — Sun at 345° → begins the 卯 Mǎo month (Rabbit)
- Qingming (清明, ~Apr 5) — Sun at 15° → begins the 辰 Chén month (Dragon)
- Lixia (立夏, ~May 5) — Sun at 45° → begins the 巳 Sì month (Snake)
- Mangzhong (芒种, ~Jun 6) — Sun at 75° → begins the 午 Wǔ month (Horse)
- Xiaoshu (小暑, ~Jul 7) — Sun at 105° → begins the 未 Wèi month (Goat)
- Liqiu (立秋, ~Aug 8) — Sun at 135° → begins the 申 Shēn month (Monkey)
- Bailu (白露, ~Sep 8) — Sun at 165° → begins the 酉 Yǒu month (Rooster)
- Hanlu (寒露, ~Oct 8) — Sun at 195° → begins the 戌 Xū month (Dog)
- Lidong (立冬, ~Nov 7) — Sun at 225° → begins the 亥 Hài month (Pig)
- Daxue (大雪, ~Dec 7) — Sun at 255° → begins the 子 Zǐ month (Rat)
- Xiaohan (小寒, ~Jan 5) — Sun at 285° → begins the 丑 Chǒu month (Ox)
Modern Bazi engines compute these solar terms to the second, using ephemeris-grade Newton-Raphson iteration on the Sun's apparent longitude. Cosmos Daily's engine uses the same Meeus astronomical algorithms (Chapter 25 for Sun position) that astronomers use, accurate to within seconds for any year between 1900 and 2100.
Why precision matters: a person born February 4 at 11:00 a.m. and another born February 4 at 11:30 a.m. of the same year may be in different Bazi years if Lichun fell at 11:15 a.m. between them. The Year and Month pillars depend on which side of the term boundary the birth moment falls. Sloppy engines round to whole days and corrupt the chart for everyone born within a day of a term boundary.
The Day Pillar — A Continuous Day Counter
The Year and Month pillars depend on solar terms; the Day pillar depends on something simpler and even more precise: the count of days from a known reference point. Bazi uses the sexagenary day cycle, a 60-day rotation of stem-branch combinations that has been running unbroken for thousands of years.
The mathematics is straightforward. Given any date with a known Bazi day pillar (an "anchor" day), every subsequent date increments through the 60-day cycle. Given the Julian Day Number (JD) for any date, the day pillar is:
The offset is calibrated against historical anchor dates documented in the classical texts. Once calibrated, every day pillar from antiquity to the year 9999 is deterministically computable. There is no ambiguity. The day a person was born has exactly one Day pillar.
One subtlety: the Bazi day boundary is not midnight. It is 23:00 local time. A person born at 23:30 on June 14 is in the Day pillar for June 15, not June 14. This is the classical 子 Zǐ hour boundary; modern engines respect it.
The Hour Pillar — 12 Two-Hour Blocks
The traditional Chinese day is divided into twelve two-hour blocks (时辰, shíchen), each governed by an Earthly Branch. The blocks start at 23:00 and roll forward in two-hour increments:
| Block | Branch | Animal | Element |
|---|---|---|---|
| 23:00–01:00 | 子 Zǐ | Rat | Yang Water |
| 01:00–03:00 | 丑 Chǒu | Ox | Yin Earth |
| 03:00–05:00 | 寅 Yín | Tiger | Yang Wood |
| 05:00–07:00 | 卯 Mǎo | Rabbit | Yin Wood |
| 07:00–09:00 | 辰 Chén | Dragon | Yang Earth |
| 09:00–11:00 | 巳 Sì | Snake | Yin Fire |
| 11:00–13:00 | 午 Wǔ | Horse | Yang Fire |
| 13:00–15:00 | 未 Wèi | Goat | Yin Earth |
| 15:00–17:00 | 申 Shēn | Monkey | Yang Metal |
| 17:00–19:00 | 酉 Yǒu | Rooster | Yin Metal |
| 19:00–21:00 | 戌 Xū | Dog | Yang Earth |
| 21:00–23:00 | 亥 Hài | Pig | Yin Water |
The hour stem derives from the day stem using the classical 五鼠遁 (Wǔ Shǔ Dùn, "Five Rat Concealment") rule: the stem of the 子 Zǐ hour on a given day depends on which day stem is in effect. The same kind of derivation rule, called 五虎遁 (Wǔ Hǔ Dùn, "Five Tiger Concealment"), is used to derive month stems from year stems. Both rules are deterministic mappings; the engine just looks them up.
The Bazi engine does not simulate astrology. It performs astronomy and calendar mathematics to a known precision, and hands the result to the practitioner as the chart's hard, true substrate.
The Day Master
Of all eight characters, the most important is the Day stem — the Day Master (日主, Rì Zhǔ). This single character represents you. It is the reference point for every other interpretation in the chart.
There are ten possible Day Masters — five elements (Wood, Fire, Earth, Metal, Water) crossed with Yin/Yang polarity:
| Stem | Element | Yang/Yin | Image |
|---|---|---|---|
| 甲 Jiǎ | Wood | Yang | Great tree, oak |
| 乙 Yǐ | Wood | Yin | Vine, grass, flowers |
| 丙 Bǐng | Fire | Yang | The Sun, blazing fire |
| 丁 Dīng | Fire | Yin | Candle flame, lamp |
| 戊 Wù | Earth | Yang | Mountain, rock |
| 己 Jǐ | Earth | Yin | Garden soil, field |
| 庚 Gēng | Metal | Yang | Sword, axe, raw ore |
| 辛 Xīn | Metal | Yin | Jewel, refined metal |
| 壬 Rén | Water | Yang | Ocean, great river |
| 癸 Guǐ | Water | Yin | Rain, dew, mist |
The first reading-day question is: is this Day Master strong or weak? A Day Master is strong if the chart contains many supporting elements (the same element, or the element that produces it) and weak if the chart is dominated by elements that drain or control it. The strength assessment determines what the chart needs (favourable elements, 用神 yòng shén) and what destabilises it (unfavourable elements, 忌神 jì shén). Every interpretive move that follows depends on this initial diagnosis.
Hidden Stems — What Lies Beneath
Each Earthly Branch contains one to three Heavenly Stems hidden inside it — sub-elements that the surface character does not announce. These are called 藏干 (cáng gān, "stored stems") or simply hidden stems.
For example, the branch 寅 Yín (Tiger) contains three hidden stems:
- 甲 Jiǎ (Yang Wood) — the main hidden stem (本气, primary qi)
- 丙 Bǐng (Yang Fire) — the middle hidden stem (中气)
- 戊 Wù (Yang Earth) — the residual hidden stem (余气)
Practitioners read hidden stems to find what the surface chart does not show. A Day Master that looks weak based on the visible stems may be secretly supported by hidden stems in the day branch. A talent that doesn't appear in any visible position may live entirely in the hidden stems and only manifest in specific Luck Pillar windows that activate it.
The full table of hidden stems for all twelve branches is part of the engine's reference data. Cosmos Daily uses the standard Yuan Tian Gang attributions used in mainstream classical Bazi practice.
The Ten Gods
Once the Day Master is fixed, every other stem in the chart receives a Ten Gods (十神, Shí Shén) label based on its relationship to the Day Master. The label depends on two things: whether the other stem produces, controls, or is controlled by the Day Master's element, and whether it shares the Day Master's polarity (same Yin/Yang) or opposes it.
The ten labels:
| Ten God | Relationship | Domain |
|---|---|---|
| 比肩 Bǐ Jiān | Same element, same polarity | Peer, friend, sibling, equal |
| 劫财 Jié Cái | Same element, opposite polarity | Rival, the wealth-stealer, competitor |
| 食神 Shí Shén | DM produces it, same polarity | Output, expression, creativity, performance |
| 伤官 Shāng Guān | DM produces it, opposite polarity | Hurt-Officer, rebellion, talent that wounds authority |
| 正财 Zhèng Cái | DM controls it, opposite polarity | Earned wealth, formal income, the spouse (if male) |
| 偏财 Piān Cái | DM controls it, same polarity | Speculative wealth, side income, fortune from movement |
| 正官 Zhèng Guān | Controls DM, opposite polarity | Officer, formal authority, structure, the husband (if female) |
| 七杀 Qī Shā | Controls DM, same polarity | Seven Killings, sharp authority, the trial that forges |
| 正印 Zhèng Yìn | Produces DM, opposite polarity | Direct Resource, support, mother, study |
| 偏印 Piān Yìn | Produces DM, same polarity | Indirect Resource, unconventional learning, the inner teacher |
The Ten Gods are Bazi's vocabulary for relationships, career, family, and timing. A chart with a strong 正官 Zhèng Guān is built for institutional authority. A chart with a clear 食神 Shí Shén is built for creative output. A chart where the 财 Cái element is in a Day branch hidden stem may produce wealth that surfaces only when a specific Luck Pillar activates it. Ten Gods analysis is where Bazi becomes interpretively rich — and where the engine's job ends and the practitioner's begins.
Luck Pillars — The Decade Clock
The natal chart is fixed for life. But a separate engine output runs alongside it: the Luck Pillars (大运, Dà Yùn), ten-year periods that interact with the natal chart and govern the elemental weather of each decade.
Luck Pillars are calculated by counting forward (or backward, depending on the gender and the polarity of the Year stem) from the Month pillar through the sexagenary cycle of stem-branch combinations. The first Luck Pillar begins at a specific age (calculated from the distance in days between the birth moment and the next or previous solar term, then divided by 3). Every ten years thereafter, a new pillar replaces the previous one.
The classical rule:
- Yang Year stem + Male or Yin Year stem + Female: Luck Pillars move forward (順排) through the sexagenary cycle
- Yin Year stem + Male or Yang Year stem + Female: Luck Pillars move backward (逆排)
Each Luck Pillar carries one stem and one branch with their associated elements. Whether that decade is favourable depends entirely on whether the pillar's elements support the Day Master (favourable) or destabilise it (unfavourable). Bazi practitioners read the Luck Pillars as the long arc of the life — the seasons of the soul, ten years at a time. A weak Day Master in a favourable Luck Pillar can flourish; a strong Day Master in a clashing Luck Pillar can be tested in ways that look like external misfortune but are precisely the chart in conversation with time.
Layered on top of the Luck Pillars are Annual Pillars (流年, Liú Nián) — the year's own stem-branch — and Monthly Pillars (流月, Liú Yuè). Together with the Luck Pillar, these three timing layers form the Bazi practitioner's predictive grid: the decade, the year, and the month, each interacting with the natal chart in specific ways.
See your own eight characters
Cosmos Daily's Bazi engine computes your Year, Month, Day, and Hour pillars to the second, with hidden stems, Ten Gods, and the Luck Pillar clock for your full life arc.
Cast your Bazi chart →What the Engine Does Not Decide
Everything described above is calculation. It is precise, deterministic, and reproducible. Two competent engines given the same birth moment will produce the same eight characters, the same hidden stems, the same Ten Gods labels, and the same Luck Pillar sequence. There is no interpretation in any of it.
What is not determined by the engine: the strength assessment of the Day Master in borderline cases (different schools weight stem-branch contributions differently), which Ten God to emphasise as the chart's controlling theme, how to read element clashes, and the operative instruction for the year. These are the practitioner's craft. A good engine gives the practitioner a clean, true substrate. The reading is what they build from there.
The Cosmos Daily engine is built for accuracy at the substrate. When you cast a chart, you can trust that the eight characters, the hidden stems, and the Luck Pillar timing are correct. The reading sits on top of that substrate as Bazi practice has done for two thousand years — a working method, not a magic trick.
Frequently Asked
What if I don't know my exact birth time?
The Year, Month, and Day pillars can be computed from the date alone with high accuracy — the only ambiguity is people born within a few minutes of a solar-term boundary or the 23:00 day boundary. The Hour pillar requires a known birth time; without it, you have a six-character chart instead of an eight-character one. A six-character chart is still readable but loses information about daily timing and the spouse axis.
Do I use my local time zone or Beijing time?
Local solar time at the birthplace, ideally. Most people use the standard time zone of their birthplace, which is close enough for most purposes. Borderline cases (births within minutes of an hour boundary) benefit from converting to true local solar time using longitude.
What about Daylight Saving Time?
If your birth was during DST, the standard time (DST minus one hour) is the one to use. The Bazi calendar is anchored to the Sun, not to civic time policy.
How does the engine handle leap years?
The Bazi calendar is solar-anchored, so leap days don't cause problems. The Year and Month boundaries are tied to specific solar longitudes; they fall slightly differently each Gregorian year because of the leap-year adjustment, and the engine computes them directly from astronomy rather than from the calendar.
Why does my Bazi look different on different sites?
Most discrepancies come from sloppy time-zone handling, midnight-vs-23:00 day boundaries, or rounded solar terms. A second-precision engine like Cosmos Daily's will agree with the classical Chinese published almanacs (万年历) to the day pillar for any birth moment. Where engines disagree, follow the one that uses real astronomy.