# Nine Star Periods (紫白飞星)

> Finds the annual, monthly and daily 紫白 (zǐbái) star (一白 … 九紫) of a date and its 20-year period in the 180-year 三元九运 (sānyuán jiǔyùn) cycle counted from 1864, as used in Flying Star (玄空飞星) feng shui reference tables.

- Calculator id: `nine-star-feng-shui` · Category: Chinese Calendar (`lunar`) · Tool name: `calculate_nine_star_periods`
- Canonical page: https://tttkmbb.com/lunar/nine-star-feng-shui · This document: https://tttkmbb.com/lunar/nine-star-feng-shui.md · JSON definition: https://tttkmbb.com/lunar/nine-star-feng-shui.json

## Purpose

Finds the annual, monthly and daily 紫白 (zǐbái) star (一白 … 九紫) of a date and its 20-year period in the 180-year 三元九运 (sānyuán jiǔyùn) cycle counted from 1864, as used in Flying Star (玄空飞星) feng shui reference tables.

**Use when:** You need the 年紫白 / 月紫白 / 日紫白 star numbers of a date, the current 运 (period) and its years, or the trigram and element assigned to each star.

**Do not use when:** You need a building's flying-star chart (sitting/facing directions are required), the Ming Gua of a person (use ming-gua in the yijing category), or advice — this is a table lookup, not an evaluation.

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `date` | date |  | optional, default "today" | Gregorian civil date in China Standard Time (1900–2100); defaults to the current UTC date. |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `year_used` | integer |  | Year of the 立春-based cycle that contains the date (the year changes at 立春, about 4 February). |
| `year_star` | integer |  | Annual star number 1–9. |
| `year_star_name` | string |  | Number, Chinese name, element and trigram of the annual star. |
| `month_star` | integer |  | Monthly star number 1–9 for the solar month (changes at each 节). |
| `month_star_name` | string |  | Number, name, element and trigram of the monthly star. |
| `day_star` | integer |  | Daily star number 1–9 (simplified 阳遁/阴遁 convention, see method). |
| `day_star_name` | string |  | Number, name, element and trigram of the daily star. |
| `day_star_cycle` | string |  | Whether the day is in the ascending 阳遁 or descending 阴遁 sequence and the 甲子 day it starts from. |
| `period_number` | integer |  | Period 1–9 of the 三元九运 cycle. |
| `period_name` | string |  | Yuan and period, e.g. 下元九运. |
| `period_years` | string |  | First and last calendar year of the period (each begins at 立春). |
| `period_trigram_element` | string |  | Trigram and element of the period's star. |
| `notes` | string_list |  | Conventions applied. |

## Formula

`year_star = 1 − ((year − 1864) mod 9) wrapped into 1–9; month_star = start − months since 寅, start = 8 for 子午卯酉 years, 5 for 辰戌丑未, 2 for 寅申巳亥; day_star = 1 + n (阳遁) or 9 − n (阴遁) wrapped into 1–9, n = days since the first 甲子 day on or after the winter (阳) or summer (阴) solstice; period = floor((year − 1864) / 20) + 1`

Year and period use the 立春 boundary. The day star uses the simplified convention that 阳遁 starts at 一白 on the first 甲子 day on or after the winter solstice and 阴遁 starts at 九紫 on the first 甲子 day on or after the summer solstice; almanacs that shift the start to the 甲子 nearest the solstice (with 置闰 adjustments) can differ. Traditional reference calculation of the Chinese calendar tradition; not a prediction and not medical, legal or financial advice.

## Data Sources

- Flying Star Feng Shui – nine stars and 20-year periods (Wikipedia) — https://en.wikipedia.org/wiki/Flying_Star_Feng_Shui (reference, retrieved 2026-09-24)
- Lo Shu Square (Wikipedia) — https://en.wikipedia.org/wiki/Lo_Shu_Square (reference, retrieved 2026-09-24)
- Solar term (Wikipedia) — https://en.wikipedia.org/wiki/Solar_term (reference, retrieved 2026-09-24)

Data freshness: `daily` (max_age_seconds 86400). Depends on the current date.

## API

- `GET https://tttkmbb.com/api/v1/calculate/nine-star-feng-shui?`
- `POST https://tttkmbb.com/api/v1/calculate/nine-star-feng-shui` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/nine-star-feng-shui · OpenAPI operationId `calculate_nine_star_periods` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "nine-star-feng-shui", "inputs": {…}}`

## Example

- 2024-06-01 (first year of Period 9): inputs `{"date":"2024-06-01"}` → `{"year_used":2024,"year_star":3,"year_star_name":"3 三碧 (Sanbi) — Wood, 震 Zhen","month_star":2,"day_star":9,"day_star_cycle":"阳遁 (yang, ascending) from the 甲子 day 2024-01-01 (day 153 of the sequence)","period_number":9,"period_name":"下元九运 (Xiayuan, lower yuan, period 9)","period_years":"2024–2043","period_trigram_element":"离 Li — Fire (九紫 Jiuzi)"}`
- 2026-09-24: inputs `{"date":"2026-09-24"}` → `{"year_used":2026,"year_star":1,"year_star_name":"1 一白 (Yibai) — Water, 坎 Kan","month_star":1,"day_star":8,"period_number":9,"period_years":"2024–2043"}`

```
GET https://tttkmbb.com/api/v1/calculate/nine-star-feng-shui?date=2024-06-01
```

## Limitations

You need a building's flying-star chart (sitting/facing directions are required), the Ming Gua of a person (use ming-gua in the yijing category), or advice — this is a table lookup, not an evaluation. Year and period use the 立春 boundary. The day star uses the simplified convention that 阳遁 starts at 一白 on the first 甲子 day on or after the winter solstice and 阴遁 starts at 九紫 on the first 甲子 day on or after the summer solstice; almanacs that shift the start to the 甲子 nearest the solstice (with 置闰 adjustments) can differ. Traditional reference calculation of the Chinese calendar tradition; not a prediction and not medical, legal or financial advice. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Why does the year star change at 立春 and not at Chinese New Year?**

Flying-star tables follow the solar (节气) calendar like Bazi: 2026 becomes a 一白 year on 2026-02-04, thirteen days before Chinese New Year.

**When did Period 9 start?**

Period 9 (下元九运, 九紫离火) runs from 立春 2024 (2024-02-04) to 立春 2044; Period 1 of the next 180-year cycle starts in 2044.

**Why might the day star differ from my almanac?**

Daily stars have several published conventions for choosing the 甲子 day that starts each 阳遁/阴遁 half-year. This calculator states its rule in the day_star_cycle output so results can be compared.

## Related

- [Chinese Almanac Day (黄历)](https://tttkmbb.com/lunar/chinese-almanac.md) — Other day attributes of the same date.
- [24 Solar Terms Calculator (二十四节气)](https://tttkmbb.com/lunar/solar-terms.md) — 立春 and the 节 that start each month star.
- [Chinese Zodiac Calculator (生肖)](https://tttkmbb.com/lunar/chinese-zodiac.md) — Zodiac and stem-branch of the year.
