House Direction Analyzer (房屋朝向)
What the Yangzhai Shishu says about a house · door sectors · hours of sun
House Direction Analyzer (房屋朝向)
Enter information
How to use
Enter birth year and sex
These give the trigram. If you were born before 立春 that year, tick the box and the tool counts the previous year.
Measure the facing
Stand inside the main door, look out and read a compass or phone compass. Pick one of the eight directions, or type the bearing; if the bearing sits close to a sector line the tool tells you to measure again.
Pick the door sector
Optional. For West-Four people the book grades a house by its door, so the grade is only exact once you choose one.
Read the result
The book's grade and the door sectors come first, then the sun table for this face. Switch the sun table to the side your windows are on.
A person has a trigram; a house only has a direction
This tool reads a house the way the Yangzhai Shishu (陽宅十書) does. That Ming manual, reprinted in the Qing encyclopedia Gujin Tushu Jicheng, does not sort houses into East and West. It says the opposite: a house can be spoken of by its eight directions but not by a trigram (「宅但可謂八方,不可謂八卦」). The trigram belongs to the person, from birth year and sex. The question is whether this house's main door can be opened in one of that person's four good sectors.
Why the door decides
A main door sits on the front of the house, so it can only land in the facing sector or the two beside it. East-Four people have north, southeast, east and south. A house sitting north and facing south offers southeast and south, and the book grades it 上上吉. A house sitting east and facing west offers southwest, west and northwest, all West-Four, so the book calls it 不宜居 and gives that reason: 「蓋以乾兌坤俱不宜開門故也」. West-Four people can find a door on every side, as long as it is the right door. Every door the book names fits this rule, and this tool's test suite checks them one at a time.
Sunlight is a separate question
"Sit north, face south" is a habit of the northern mid-latitudes. The sun's path changes with latitude, so this page gives no general advice and computes the hours for the city you pick. In Singapore a west face has about six hours of afternoon sun all year; a north face has the sun all day in June and none in December, and a south face is the reverse. In Sydney it is the north face that has the winter sun all day.
"A house can be spoken of by its eight directions, not by a trigram." — Yangzhai Shishu (陽宅十書)
How to read the result
The grade is the rule of a Ming book, and nothing shows it affects the people who live in a house. The sun hours are geometry for a clear day with nothing in the way. Choosing a home still takes a visit. For all eight sectors of a home use Bagua House Analysis; to turn a compass reading into a sitting and facing use the Luopan Reader.
The book calls only one kind of house unfit to live in
Across the book's lines on the four facings, 不宜居 appears for one case only: an East-Four person in a house facing west. West-Four people have no such facing, only doors that must go in the named place.
When one family holds different trigrams, the book answers with 截路分房: past the main door, every wall and door that divides the house starts the count again from that door, so each person keeps their own rooms (各修各居).
For the main door the book says 應以家長為主, go by the head of the household, and for a couple in different groups 當以夫為主耳, go by the husband. That is a Ming household rule; we report it and do not recommend it.
In Singapore, about 1.4°N, a west face has about six hours of afternoon sun in June, at the equinoxes and in December, while a north face drops from about twelve hours in June to none in December.
Frequently Asked Questions
The Yangzhai Shishu has no such division. It says a house has directions and a person has the trigram; an east-facing house is 亦吉 for East-Four people with the door in the southeast, and West-Four people can use it too with the door in the northeast. An earlier version of this page sorted houses by facing, which is not this book's rule, and it has been corrected. The East House and West House labels common online come from other manuals we could not read and check, so we do not use them.
The Yangzhai Shishu describes walled courtyard houses and says nothing about flats. This tool measures the way the main door looks out, because that is what the door rule needs. Sunlight depends on the side your windows are on, so the sun table switches separately and the two need not match.
The book counts by the 干支 year, which does not start on 1 January. Like the bazi tools on this site we turn the year at 立春: tick the box if you were born before it and the tool uses the previous year. The book does not say whether its year turns at 立春 or at lunar new year; that is our choice.
The book goes by the husband and then gives the wife a suitable room, which is a Ming arrangement. Most households today would talk it through. Run the tool once for each of you and compare the door sectors.
No. The grade is a traditional rule and says nothing about whether a home is good.
It uses NOAA's solar position formula to test, minute by minute, whether the sun is above the horizon and in front of this face, on the June solstice, the equinoxes and the December solstice. City latitudes are to one decimal. Cloud, obstructions, shading and the atmosphere are not counted, and it is not a measure of heat.
Method & sources
How it computes
Trigram: reduce the Gregorian birth year to one digit; men 11 − n, women 4 + n, less 9 if above 9; 5 becomes 2 for men, 8 for women; a birth before 立春 counts in the previous year. House: the grade the Yangzhai Shishu gives that trigram for that facing, and its door sectors: the three front sectors that fall in the person's own group. Sun: hours a vertical face has the sun in front of it, from NOAA's solar position formula.
What this tool implements
- This is a statement of a tradition, not a forecast. "Accurate" here means faithful to the Yangzhai Shishu (陽宅十書) as printed in the Gujin Tushu Jicheng; it never means the grades are true.
- The house grades and door sectors are transcribed from the 定宅 and 定門 lines of the eight 用例 in 卷675. The rule underneath them (a main door is on the front, so it can only land in three sectors, and must be in the person's group) is computed, and reproduces every door the book names and every 不宜居.
- Only the four square-on facings have a line in the book. A diagonal house is reported as having no grade, not given one by analogy.
- Sun hours are geometry for a clear day with nothing in the way, in solar time, on the two solstices and the equinoxes. They are not a measure of heat, and the page says so.
- Corrected 2026-11-02: the local trigram formula (off by one for every birth before 2000; 101 of 402 year × sex pairs in the wrong group; 12 male years crashed the result); houses filed as East or West by their facing (the book refuses to give a house a trigram at all: 「宅但可謂八方,不可謂八卦」); Northern Hemisphere sunlight paragraphs, replaced by computed hours for the reader's city; unsourced figures for resale premiums, indoor temperatures, air-conditioning bills and the share of cross-group marriages; a claim that the East/West house division comes from the 八宅明鏡, whose text we could not read.
Sources
- 陽宅十書 (Yangzhai Shishu), Ming. 欽定古今圖書集成, 博物彙編, 藝術典, 卷675 (論福元, 起男女上中下元訣, 三元甲子福德宮定局, 東四位 and 西四位 用例): https://zh.wikisource.org/wiki/%E6%AC%BD%E5%AE%9A%E5%8F%A4%E4%BB%…
- 陽宅十書, 欽定古今圖書集成, 藝術典, 卷676 (論大遊年, the eight verses and the stars): https://zh.wikisource.org/wiki/%E6%AC%BD%E5%AE%9A%E5%8F%A4%E4%BB%…
- NOAA Global Monitoring Laboratory. General Solar Position Calculations (solar zenith angle from latitude, declination and hour angle): https://gml.noaa.gov/grad/solcalc/solareqns.PDF
What can make this go out of date
- None at runtime; everything is computed in the browser and nothing the reader enters leaves the page or enters the URL.
- 立春 dates come from the site's lunisolar engine. City latitudes are rounded to one decimal.