What is a Kua number, and how is it worked out?

Published 2026-08-20

A Kua number is one of eight numbers — 1, 2, 3, 4, 6, 7, 8 or 9 — worked out from the year you were born and your sex. In Eight Mansions (八宅, Ba Zhai), the compass-based school this site runs, that number sorts the eight compass directions into four that suit you and four that do not. It is the only input Eight Mansions takes from you personally.

The arithmetic

kuaNumber in src/lib/kua.ts is the source of truth on this site, and it does three things.

  1. Take the last two digits of the year and add them together until one digit is left. For 1985 that is 8 + 5 = 13, then 1 + 3 = 4.
  2. Apply the formula for the sex and era. For years before 2000, men take 10 minus that digit and women add 5. From 2000 on, men take 9 minus it and women add 6.
  3. Reduce to a single digit again if needed.

For 1985 the men’s line gives 10 − 4 = 6, and the women’s line gives 4 + 5 = 9. Running the code returns 6 and 9.

Birth yearLast two digits reducedMenWomen
1975378
1985469
1990918
2001187
2004421
2015633

The two eras use different formulas. A man born in 2001 has the number 8, which is West group. Apply the older pre-2000 formula to the same year and you get 10 − 1 = 9, which is East group. One wrong formula, and all four directions swap for the four you were told to avoid. This is the most common way a hand calculation goes wrong for anyone born this century.

2004 hits the missing number. The men’s line gives 9 − 4 = 5, and there is no trigram numbered 5 in the eight-direction map, so standard practice substitutes 2 for men and 8 for women. That is what the code returns, and it is also where practice is split — some teachers do it differently.

Men and women born in the same year usually differ, and often by group. In 1985 the men’s number is 6 and the women’s is 9, which are in opposite groups. In 2015 both are 3. The two formulas do not track each other.

The year starts in February, not January

Eight Mansions counts a year from the beginning of spring (立春, lichun), an astronomical moment that lands on 3, 4 or 5 February depending on the year. Across 1900–2100 it falls on 3 February in 39 years, 4 February in 128 and 5 February in 34. A calculator that hardcodes 4 February is therefore wrong in 73 of those 201 years.

Anyone born in January belongs to the previous year for this purpose, in every year the site covers. On the boundary day itself the hour decides, because the start of spring is a moment: in 2025 it was 3 February at 22:10 UTC+8, so a birth at 21:00 that day counts as 2024 and a birth at 23:30 counts as 2025.

The Kua number calculator uses the real date for each year and asks for a birth time only when your birthday is the boundary day. When does the Chinese year actually start works through the two different year boundaries in more detail.

What the number gives you

Each number belongs to a trigram, which sits in one compass direction. From that seat the other seven directions are ranked, and the four favorable ones carry traditional names. This table is generated from AUSPICIOUS in src/lib/kua.ts, not copied from anywhere:

KuaTrigramGroupSheng ChiTian YiYan NianFu Wei
1Kan (坎), WaterEastSoutheastEastSouthNorth
2Kun (坤), EarthWestNortheastWestNorthwestSouthwest
3Zhen (震), WoodEastSouthNorthSoutheastEast
4Xun (巽), WoodEastNorthSouthEastSoutheast
6Qian (乾), MetalWestWestNortheastSouthwestNorthwest
7Dui (兌), MetalWestNorthwestSouthwestNortheastWest
8Gen (艮), EarthWestSouthwestNorthwestWestNortheast
9Li (離), FireEastEastSoutheastNorthSouth

The other four directions are named Huo Hai (禍害), Wu Gui (五鬼), Liu Sha (六煞) and Jue Ming (絕命), and the calculator lists all eight for whatever number you get.

The numbers fall into two blocks of four. Kua 1, 3, 4 and 9 are the East group and share North, South, East and Southeast; Kua 2, 6, 7 and 8 are the West group and share Southwest, West, Northwest and Northeast. The two sets do not overlap: every direction favorable to one group is unfavorable to the other. What differs inside a group is only which of the four ranks first.

What your number is not for

Your Kua number answers “which way should I face” — the direction your head points in bed, the direction you look at a desk. It does not tell you which corner of the house a room should be in. That second question uses the building’s sitting direction, not your birth year, and most free calculators run the two together. They are separate charts that happen to use the same eight names.

And the number is a classification, not a forecast. Eight Mansions calls a direction Sheng Chi or Jue Ming and associates each with a theme; it does not predict anything measurable, and neither do we. See method and assumptions for what the site computes, the 1900–2100 range it is valid over, and where it stops.

Work it out for your own place