Every rule this tool applies, where it came from, and the places where reasonable people do it differently.
A calculator for the four pillars and the stems-and-branches diagrams, built to follow the method taught at ICOM rather than the one most online calculators use. Those two disagree more often than you would expect: on the month pillar alone, they differ on 24.37% of birth dates.
It is a study and reference tool. It computes a chart and draws the diagrams; it does not interpret anything, and it makes no claim about health, diagnosis or treatment.
Most of the code was written with Claude, Anthropic's AI. That is worth saying plainly, and it is worth being equally plain that it proves nothing on its own: a model will write confident, wrong arithmetic as readily as correct arithmetic. What the tool is actually resting on is the checking.
The calendar rules were settled against charts worked out by hand, and then the whole 1900–2100 table was diffed against an independent implementation across every day in that range — the day pillar turns out to be an unbroken sixty-cycle with no exceptions at all. The diagrams were rebuilt from the original drawings and checked against them one by one, which is how an error in the source set was found and deliberately not reproduced. Eighty-one tests run on every change.
None of that makes it right. It makes it checkable, which is the most any tool of this kind can offer. If you find a chart it gets wrong, that is the useful thing to send.
ICOM writes stems and branches by their channel rather than by name, which is what makes the diagrams readable at a glance once you know the convention.
| Written as | Means | Example |
|---|---|---|
| a channel with its great movement beside it | a stem | Ding 丁 (dīng) is Ht in Wo— the Heart channel, great movement Wood |
| a channel with a double underline | a branch | Zi 子 (zǐ) is written Gb, underlined twice |
| a single underline | the corrective energy | at the centre of the legacy diagram |
Great movements are abbreviated in two letters where one would be ambiguous: Wo for Wood and Wa for Water, alongside F for Fire, E for Earth and M for Metal.
Points are given in the English convention — Sp3, Ki2, Gb34 — not the French or numeric-only ones.
Each branch carries one to three hidden stems (藏干 cáng gān), shown along the bottom of the chart table. They look like an arbitrary list, and they are not: the twelve rows fall into three groups, and every one follows its group's rule.
The four cardinal branches — Zi, Mao, Wu, You — sit at the peak of a season and hide the yin stem of their own element, and nothing else. Wu is the exception that also carries Ji, yin Earth.
The four season-openers — Yin, Si, Shen, Hai — hide only yang stems: their own element, then the element whose growth begins there, then Earth. Yin opens spring and carries Jia (Wood), Bing (Fire, which begins at Yin) and Wu (Earth). Hai is the one that carries no Earth.
The four earth stores — Chen, Wei, Xu, Chou — are the last month of each season, and they hide three things in order: their own Earth stem, the residual of the season just ending, and the element that season puts into storage. Chen closes spring, so it carries Wu (Earth), Yi (Wood, the residue of spring) and Gui (Water, which winter stored).
| Group | Branches | What they hide |
|---|---|---|
| peak of a season | Zi, Mao, Wu, You | the yin stem of their own element |
| opener of a season | Yin, Si, Shen, Hai | yang stems only: own element, what begins there, Earth |
| earth store | Chen, Wei, Xu, Chou | Earth, the residue of the season ending, the element stored |
Classically each hidden stem also rules a share of the branch's month — a main, middle and residual qi with day counts attached. Those counts are not in the tables this tool was built from, so it does not show them.
Ten heavenly stems (天干 tiān gān) and twelve earthly branches (地支 dì zhī) turn together. Because a yang stem only ever meets a yang branch, they produce sixty pairs rather than a hundred and twenty, and the cycle repeats every sixty units — years, months, days or hours.
Two of those four are counted directly. The other two are derived:
The sixty pairs are numbered, and this tool shows that number on the branch row —
18 of 60
and so on. Jia Zi is 1 and Gui Hai is 60. It is the numbering the
printed tables use, and it is what a hand calculation arrives at: work a day pillar
from the tables and you get a number, not a name, which makes it the quickest way to
check a chart drawn here against one drawn on paper.
The day pillar is the one thing that never needs a rule: it is an unbroken sixty-day count with no exceptions anywhere in the range this tool covers, which is 4 February 1900 to 31 December 2100.
This is where calculators diverge, and where the answers below were settled by working charts on paper and comparing them against the code. Five charts, five rules. Each is now fixed in the test suite, so none of them can drift.
| Question | Answer here | How often it matters |
|---|---|---|
| Does the stem-branch year begin at the Zi month? | No. It begins in the new year | a claim that turned out to be wrong |
| Month from the lunar month, or from the solar term? | The lunar month | 24.37% of days |
| Year boundary: Chinese New Year, or Li Chun? | Chinese New Year | 2.03% |
| What pillar does a leap month take? | The one before it | 2.96% |
| Does the day pillar roll at 23:00? | No — only the hour | one hour in twenty-four |
Most calculators read the month from the solar terms (節氣 jié qì), the twenty-four divisions of the solar year. This one reads it from the lunar month, as taught. On 5 September 2016 the lunar reading gives Ding You and the solar reading gives Bing Shen — a different pillar for the same birth.
It matters more than one cell of the chart, because the seasonal factors in the elemental calculation come from the month branch. Change the month and the whole weight table moves.
You can see both: the calculator has a Solar terms option alongside the default, purely for comparison.
Li Chun (立春 lì chūn, beginning of spring
) is a solar term that
falls near 4 February every year. Chinese New Year moves between 21 January and
20 February. ICOM's own instruction is to check the lunar calendar chart — and
you only need to look something up if it moves. A hand-worked chart for
10 February 2015 gives Jia Wu, which only the later boundary can
produce.
A leap month takes the stem and branch of the month it follows. Roughly one lunar year in three has one, and about 2.96% of days fall inside one.
Zi runs 23:00 to 00:59, so it straddles midnight, and a single calendar day carries two different Zi hours: its own in the early morning, and the next day's late at night. At 23:00 the hour takes the following day's Zi stem. The day pillar does not move until midnight.
Two questions that sound like one, and are not. They answer to different things, so this tool takes a different side on each.
The Chinese calendar is astronomical, and it is computed for one meridian. New moons and solar terms happen at a single instant for the whole planet — but a calendar records dates, and which date an instant falls on depends on whose midnight you count from.
Somewhere like Spain is six or seven hours behind Beijing, so an evening birth is already tomorrow there. Converting would change the day pillar on about a quarter of Spanish births — not a nuance, a different Day Master, and therefore a different reading of everything.
This tool never converts. Not as a default, not as an option. The calendar is a dated table you look yourself up in, by the date on the birth certificate, which is what every printed table and every teacher does. Offering the alternative as a checkbox would suggest it is live, and a 26% swing in the Day Master is not something to leave to a checkbox.
The hour branches are solar: Wu is noon, the sun at its highest. Clock time is not — it is a zone offset plus daylight saving, applied to a whole country regardless of longitude.
Spain is the extreme case. It sits on the Greenwich meridian and keeps Central European Time, a decision from 1940 that was never reversed. For Valencia that is a standing error of about an hour, and two hours from late March to late October. Two hours is exactly the width of an hour pillar, so through the summer the corrected reading lands one pillar earlier every time; through the winter it does so about half the time.
That is too large to apply without saying so, and too large to ignore. So it is a switch. The default is the clock time as written, which is what a hand-worked chart uses and what your teacher and classmates will produce. Turn the switch on and the page shows the correction, its three parts, and the chart that follows from it. Most calculators quietly pick one of the two and never say which.
Three quantities, added to the moment of birth in this order:
The correction is applied to the whole moment, not to the hour alone. A birth at 00:20 in Valencia in June was 22:18 by the sun on the previous day, which moves the day pillar as well as the hour, and next to a jie qi could move the month. A tool that corrected only the hour field would produce a chart that disagrees with itself.
Nothing is converted to Beijing time at any stage. The correction is to the sun over the birthplace, which is the whole point of it.
Choosing a birthplace does not send it anywhere. The page carries a list of 34,114 settlements over fifteen thousand people, and looks the longitude up in it. The list downloads once, only if the field is used at all, and then the page keeps working offline.
A geolocation API would have been less code. It would also have put a key in public JavaScript, sent a client's birthplace to a third party on every keystroke, and made the tool stop working when the connection or the billing account did — all to fetch one number per town that has not changed since the town was founded. The list is from GeoNames, used under CC BY 4.0.
If a birthplace is not on the list, the nearest town on it will do. A tenth of a degree is fifteen seconds of solar time, and an hour pillar is two hours wide.
One place the list is edited rather than copied: China legislates a single time for the whole country, so every Chinese town here is read in Beijing time, including the Xinjiang ones that keep an unofficial clock two hours behind it. Birth records there are written in Beijing time, and reading them any other way would be two hours out.
The timezone history comes from the IANA database, which is candid about being approximate before 1970 outside each zone's own region. For twentieth-century Europe and East Asia it is good. For some countries in the 1940s and 1950s it is a careful best effort, and a birth within an hour of a wartime clock change is worth checking against a local record rather than trusted from this page.
Each element on the weights card is named for what it is to the Day Master — the day stem, and the only pillar the reading treats as the subject rather than as a weight. Change the day stem and every label moves; nothing else in the chart affects them.
| Relation | Chinese | What it is |
|---|---|---|
| Companion | 比劫 bǐ jié | the same element as the Day Master |
| Output | 食傷 shí shāng | what the Day Master generates |
| Wealth | 財 cái | what the Day Master controls |
| Influence | 官殺 guān shā | what controls the Day Master |
| Resource | 印 yìn | what generates the Day Master |
These are the Ten Gods, 十神 shí shén — ten because each of the five splits by polarity, according to whether the other stem is the same yin-yang as the Day Master or the opposite: 比肩 / 劫財, 食神 / 傷官, 正財 / 偏財, 正官 / 七殺, 正印 / 偏印. Weights are per element rather than per stem, so what the card can carry is the five. The polarity split needs the stems themselves and is not built yet.
None of this is a lookup table. Every relation falls out of the Day Master's element and the generating and controlling cycles, both of which the app already holds for other reasons.
The collapsible under the weights draws the same five numbers on the five-element circle. The circles sit at the same five angles as the legacy diagram and do not move between charts, so two readings can be set side by side. Solid arrows around the outside are the generating cycle; dashed arrows across the middle are the controlling cycle. The coloured ring is that element's share of the heaviest element in that chart, not an absolute scale — the seasonal factors multiply every total, so an absolute scale would mean nothing from one chart to the next.
A caveat of the same kind as the hidden stems: the Ten Gods belong to ziping BaZi, Song dynasty onward, and not to the wu yun liu qi behind the legacy diagram. The English used here — Companion, Output, Wealth, Influence, Resource — is plain description rather than any particular school's wording.
Both are drawn from the chart, not chosen from a library of images, so every combination exists and every one prints cleanly at any size.
The five phases on a ring, with the year's stem and branch placed on it. The
+ and − follow the cribsheet rule: a yang stem puts
+ on its great movement and − one step forward on the Ke
(controlling) cycle; a yin stem puts − on the great movement and
+ one step back.
South is at the top, as in the traditional map orientation — so Fire is at the top, Water at the bottom, Wood east and Metal west.
The older figure, and a different set of rules. It is drawn for a division:
Si Tian (司天 sī tiān,
governing heaven
) rules the first half of the lunar year; Zai Quan
(在泉 zài quán, at the spring
) rules the second. Which one is drawn
depends on the lunar month of the birth.
Here the stem sits in the circle of its great movement, not its own
element — Ding is Ht in Wo
, so Ht is drawn in the Wood circle. The branch sits
outside its circle, underlined twice. The bracket joins the two channels of the
division: TaiYin is Lung and Spleen, so it runs between Metal and Earth. Yin divisions
are drawn inside that line and yang divisions outside — which is the only thing
separating ShaoYin from TaiYang, since both join Fire to Water.
Worth stating on its own, because it looks like an error until you know it.
At the ordinary level a channel takes its organ's element: Gb is Wood, Ht is Fire. That is the assignment the five circles use.
At the branch level it takes the element of its position on the Chinese clock — which is simply the element of the branch that names it. Zi is Water, so Gb is Water there. The four earth branches (Chou, Chen, Wei, Xu) gather Liv, St, SI and Pc at the centre, and the remaining eight pair off into the cardinal directions:
| Element | Direction | Channels |
|---|---|---|
| Fire | South | Sp, Ht |
| Water | North | Gb, TH |
| Wood | East | Lu, Co |
| Metal | West | Bl, Ki |
| Earth | centre | Liv, St, SI, Pc |
This is the grouping the corrective energy lists. It is why
Earth (SI, St, Liv, Pc)
is correct even though SI and Pc are Fire channels at
the ordinary level. The corrective energies themselves have no findable source —
see below.
The calendar page carries two prohibitions — which meridians to leave alone, and which regions of the body — and neither is calculated. Both are read off the Lingshu, and the passages are short enough to quote in full, so they are quoted here rather than summarised. The Chinese is the original; the English renderings are mine, checked against Unschuld's translation, which prints the two facing one another.
The chapter is 陰陽繫日月
yīn yáng xì rì yuè, the ties between yin
and yang and the sun and moon
. It begins by cutting the body in half:
腰以上為天,腰以下為地。
From the waist upward is heaven; from the waist downward is earth.
And from that, two different clocks for the two halves:
足之十二經脈,以應十二月……手之十指,以應十日。
The twelve channels of the foot answer to the twelve months … the ten fingers of the hand answer to the ten days.
Twelve months, twelve branches; ten days, ten stems. So the arm is read from the day, through its stem, and the leg from the month, through its branch. That is the whole of it, and it is the thing most easily got wrong — a day has a branch too, and using it gives an answer that changes every morning instead of holding still through a season.
The chapter then simply lists them, one line each:
甲主左手之少陽,己主右手之少陽……壬主左手之太陰。
Jia governs the lesser yang of the left hand, Ji the lesser yang of the right hand … Ren the greater yin of the left hand.
| Stem | Channel of the hand | Stem | Channel of the hand | |
|---|---|---|---|---|
| Jia 甲 | lesser yang, left — TH | Ji 己 | lesser yang, right — TH | |
| Yi 乙 | greater yang, left — SI | Wu 戊 | greater yang, right — SI | |
| Bing 丙 | yang brightness, left — Co | Ding 丁 | yang brightness, right — Co | |
| Gui 癸 | lesser yin, left — Ht | Geng 庚 | lesser yin, right — Ht | |
| Ren 壬 | greater yin, left — Lu | Xin 辛 | greater yin, right — Lu |
The twelve branches do the same for the leg, month by month, and the chapter draws a seasonal conclusion from the pattern:
正月二月三月,人氣在左,無刺左足之陽。
In the first, second and third months the human qi is on the left: do not needle the yang of the left foot.
Four such sentences, a quarter of the year each: left-yang, right-yang, right-yin, left-yin. This is why the page names three channels for the month and not one. The sentence closes a whole polarity on one side of the lower body, and the month’s own entry from the list of twelve is one of the three inside it — in a Shen month the yin channels of the right leg are all closed, and Shen’s own is Kidney right. The commentary Neijing zhiyao xinyi narrows the rule back to the single channel of the current month; the text itself says 左足之陽, the yang channels of the left foot, in the plural. The chart in circulation draws both — a bracket round each group of three, with the month’s own named inside it — and so does this page.
The chapter is 九針論 jiǔ zhēn lùn,
on the nine needles
. Near the end, Qi Bo is asked how the shape of the body
answers to the nine regions of the land, and answers with nine lines. Three of
them:
左足應立春,其日戊寅己丑。
左脅應春分,其日乙卯。
左手應立夏,其日戊辰己巳。The left foot answers to the beginning of spring; its days are Wu Yin and Ji Chou. The left flank answers to the spring equinox; its day is Yi Mao. The left hand answers to the beginning of summer; its days are Wu Chen and Ji Si.
Nine regions, eight of them tied to a seasonal turning point and named by particular days of the sixty — twelve days in all. This is the point that decides how the whole thing is used: the rule is a day, not a stem or a branch. The right foot is closed on Wu Xu and Ji Hai, and on no other day. A Jia Xu day shares the branch and is not one of them.
The ninth region is the centre, and it works differently:
六腑膈下三藏應中州,其大禁,大禁太一所在之日,及諸戊己。
The six fu and the three zang below the diaphragm answer to the central region. For these the great prohibition holds: the great prohibition falls on the days of Taiyi's presence, and on all Wu and Ji days.
諸戊己 zhū wù jǐ — all the Wu
and Ji
— is the stems alone, any branch. Wu and Ji are the earth stems, and earth
holds the centre.
Shelley Berlinsky's nine-square sheet is this passage drawn as a figure, with the stems and branches set round the edge. The two agree entry for entry. One difference is worth recording: the sheet restricts the whole thing to a patient who is yang xu. The chapter states the prohibitions without that condition, so the qualifier comes from the teaching rather than from the text — which is why the calendar page prints it as a condition rather than as part of the quotation.
The days of Taiyi's presence are not explained in 78; the chapter before it does the
work. 九宮八風 jiǔ gōng bā fēng,
the nine mansions and the eight winds
, opens:
太一常以冬至之日,居葉蟄之宮四十六日。
Taiyi always, on the day of the winter solstice, takes up residence in the Ye Zhi mansion for forty-six days.
Then he moves on, forty-six days at a time and forty-five at two of them, round eight mansions and back to the first — three hundred and sixty-six days, one turn of the year. The eight mansions surround a ninth at the centre. It is the same nine-square figure as chapter 78: the regions of the body and the mansions of heaven are one map, which is why the centre of the body answers to the centre of the diagram.
The commentators put Taiyi's moves at the eight seasonal turning points — the two solstices, the two equinoxes, and the four beginnings of the seasons. Those are the days the chapter means, and the calendar page now marks all eight: the four beginnings are jie, taken from the calendar table, and the solstices and equinoxes are zhong qi, read from the sun by the same computation that finds the Western sign. On those days the day view closes the centre and says why. The LuoPan view draws the whole set — the twenty-four terms of the year on a compass, with the eight days of Taiyi's presence dotted.
One bookkeeping rule, stated because it was measured rather than assumed: a term is a moment, and which day it belongs to depends on whose midnight you cut at. Checking every jie date in this tool's table — 2,412 of them, 1900 to 2100 — against the computed crossings settles it: the table counts days by Beijing midnight, agreeing on all but seven crossings that fall within minutes of midnight itself. The zhong qi follow the same convention, so the wheel, the month pillar and the Taiyi days can never disagree about a date.
The legacy diagram carries a corrective energy for each branch — Pc for Zi, Ht for Yin, and so on. It is the one part of this material that cannot be traced. No one has found where it comes from, and it was dropped when the diagram was redrawn. It is here because this tool reproduces the older figure, and it is drawn without a claim attached.
Worth being plain about, because everything else on this page can be checked against a text and this cannot. If you know the source, it belongs on this page.
Forbidden regions, April 2020. The nine-square sheet, taught at ICOM.
The calculation follows the stems and branches material taught at the International College of Oriental Medicine, from the course documents and tables issued there. The diagrams reproduce the ones used in that teaching.
This is an independent tool built by a former student. It is not published by ICOM, not endorsed by it, and any error in it is mine rather than theirs.
It is worth separating them, because they are often spoken of together and they come from different places and different centuries.
The five movements and six qi — Si Tian, Zai Quan, the great movements, the whole apparatus behind the legacy diagram — come from the Huangdi Neijing Suwen, in the group of chapters usually called the seven comprehensive discourses: 66 to 71, and 74. (Chapters 72 and 73 are the two long-lost ones, and are usually printed as titles only or as much later restorations.) Those seven are not part of the earliest text: they were supplied by Wang Bing in his recension of 762 CE, along with his commentary and the reorganisation into eighty-one treatises. Whether he recovered them or composed them is a question textual scholars still argue about.
The two prohibitions on the calendar page are from the Lingshu, and older than either of the two lineages below: chapters 41, 77 and 78, quoted in what the classics say.
The hidden stems are not from the Neijing at all. They belong to the ziping four-pillars tradition, which is several centuries later — Song dynasty onwards — and reaches us through works like the Yuan Hai Zi Ping and the Ming-dynasty San Ming Tong Hui. The elemental weights and the five relations from the Day Master come from that same tradition.
So a four-pillar chart drawn the way this tool draws it is two systems laid over one another: a Tang-era medical cosmology for the movements and the divisions, and a later divinatory system for the pillars themselves. That is not a criticism of either — it is simply what the material is, and knowing which half you are reading makes some of the apparent contradictions stop being contradictions.
Where the sources were silent I have said so rather than filled the gap. Two questions are still open and will be corrected here when they are answered: whether ICOM applies any longitude or true-solar-time correction as a matter of teaching, and whether it has a stated position on births outside China.
Beside the date on a chart the tool also names the Western zodiac sign — Gemini, Cancer, and so on. It is an annotation from a different system, printed next to the calendar date because that is all it derives from; it plays no part in the pillars, the weights or the diagrams.
It is worth a section here because of how it is found. The everyday
date table — Cancer from 21 June to 22 July
— is only roughly right: a sign
begins at the instant the sun crosses a multiple of thirty degrees of longitude, and
that instant drifts by up to a day with the year. Someone born on the evening of
20 March 1985 is Aries; the table says Pisces. So this tool does not use a table. It
computes the sun’s position for the birth moment and reads the sign off the
sky, which places each boundary at the right hour of the right day.
Readers of the Chinese calendar have met these twelve cut points before. They are the 中氣 zhōng qì, the mid-terms — the half of the twenty-four solar terms that this calendar’s twelve 節 jié sit exactly between. Aries opens at the spring equinox, 春分 chūn fēn; Cancer at the summer solstice, 夏至 xià zhì. The Western zodiac and the Chinese solar year are cut from the same circle, a month’s width apart.
One honest limit: the birth time is taken as the clock shows it, without asking for a time zone. That can shift the computed moment by some hours, which matters only for a birth within those same hours of a sign boundary — a day or two per month, and even then only near the exact hour of the crossing. With no birth time at all, midday stands in.
Nothing you type leaves your browser. There is no server behind this page. The calculation, the diagrams and both exports all run on your own machine, so no birth details are transmitted, logged or stored — not by this site, and not anywhere else.
That is a property of how it is built rather than a promise about how it is operated. There is no database to be careless with and no request log to keep. It also means the page works offline once loaded, which is useful in a clinic.