House directions by cung phi (Bát trạch / Eight Mansions)
Enter a lunar birth year and gender to find the cung phi (life trigram) and the four favourable and four unfavourable directions of Bát trạch. Everything runs in your browser; nothing is sent anywhere.
How it is computed
Cung phi from the lunar birth year: male 11 − n, female n + 4, where n is the digital root of the year's digits (5 becomes Khôn for men and Cấn for women). The eight directions come from the Đại du niên song; each trigram uses all eight directions once and the four favourable directions are identical for all four trigrams of the same group.
Bát trạch is folk feng shui with no scientifically verified basis, and books differ in places. Do not put it above safety, structure, light, ventilation, legal requirements or your family's real needs. For cultural reference only.