# Five Elements Relation (五行生克)

> Determines the Wuxing (五行) relation between two elements — generating (相生, xiangsheng), controlling (相克, xiangke) or same — and returns the full generating and controlling cycles plus the traditional correspondence profile of each element (direction, season, colour, planet, organs, taste, emotion, climate, Hetu numbers, stems, branches, trigrams).

- Calculator id: `five-elements` · Category: I Ching & Five Elements (`yijing`) · Tool name: `analyze_five_element_relation`
- Canonical page: https://tttkmbb.com/yijing/five-elements · This document: https://tttkmbb.com/yijing/five-elements.md · JSON definition: https://tttkmbb.com/yijing/five-elements.json

## Purpose

Determines the Wuxing (五行) relation between two elements — generating (相生, xiangsheng), controlling (相克, xiangke) or same — and returns the full generating and controlling cycles plus the traditional correspondence profile of each element (direction, season, colour, planet, organs, taste, emotion, climate, Hetu numbers, stems, branches, trigrams).

**Use when:** You need to know how two of Wood, Fire, Earth, Metal and Water relate in the five-element cycles, or the classical correspondences of an element, e.g. when interpreting stems, branches, trigrams or a Bazi chart.

**Do not use when:** You need relations between specific stems and branches such as 六合 or 三合 (use stem-branch-relations) or trigram attributes (use bagua).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `element_a` | enum: wood \| fire \| earth \| metal \| water |  | required | Element A of the pair (wood/fire/earth/metal/water; Chinese 木火土金水 accepted). |
| `element_b` | enum: wood \| fire \| earth \| metal \| water |  | required | Element B of the pair (wood/fire/earth/metal/water; Chinese 木火土金水 accepted). |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `relation` | string |  | Relation of element A to element B in words, with the Chinese formula. |
| `relation_type` | string |  | generates, is_generated_by, controls, is_controlled_by or same (from A's point of view). |
| `relation_cn` | string |  | Chinese formula, e.g. 木生火, 水克火 or 比和. |
| `generating_cycle` | string |  | The full 相生 sequence. |
| `controlling_cycle` | string |  | The full 相克 sequence. |
| `what_a_generates` | string |  | Element produced by A (its child). |
| `what_generates_a` | string |  | Element that produces A (its parent). |
| `what_a_controls` | string |  | Element restrained by A. |
| `what_controls_a` | string |  | Element that restrains A. |
| `element_a_profile` | object |  | Direction, season, colour, planet, yin organ (脏), yang organ (腑), taste, emotion, climate, Hetu numbers, heavenly stems, earthly branches, trigrams and sense organ. |
| `element_b_profile` | object |  | The same correspondences for element B. |

## Formula

`generating (相生): 木→火→土→金→水→木; controlling (相克): 木克土, 土克水, 水克火, 火克金, 金克木; A generates B if B follows A in the generating cycle, A controls B if B is two steps after A`

Correspondences are the standard Han-dynasty tables (五行学说) as summarised in the Wuxing reference; Hetu numbers 水1/6 火2/7 木3/8 金4/9 土5/10. Traditional cultural reference calculation; not a prediction and not medical, legal or financial advice.

## Data Sources

- Wikipedia – Wuxing (Chinese philosophy) — https://en.wikipedia.org/wiki/Wuxing_(Chinese_philosophy) (reference, retrieved 2026-09-24)
- Wikipedia – Bagua — https://en.wikipedia.org/wiki/Bagua (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/five-elements?element_a=…&element_b=…`
- `POST https://tttkmbb.com/api/v1/calculate/five-elements` 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/five-elements · OpenAPI operationId `analyze_five_element_relation` 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": "five-elements", "inputs": {…}}`

## Example

- Wood and Fire: inputs `{"element_a":"wood","element_b":"fire"}` → `{"relation":"Wood generates Fire (木生火)","relation_type":"generates","relation_cn":"木生火","what_a_generates":"Fire (火)","what_a_controls":"Earth (土)","what_controls_a":"Metal (金)","what_generates_a":"Water (水)"}`
- Water and Fire: inputs `{"element_a":"water","element_b":"fire"}` → `{"relation":"Water controls Fire (水克火)","relation_type":"controls","relation_cn":"水克火","what_a_generates":"Wood (木)","what_generates_a":"Metal (金)"}`

```
GET https://tttkmbb.com/api/v1/calculate/five-elements?element_a=wood&element_b=fire
```

## Limitations

You need relations between specific stems and branches such as 六合 or 三合 (use stem-branch-relations) or trigram attributes (use bagua). Correspondences are the standard Han-dynasty tables (五行学说) as summarised in the Wuxing reference; Hetu numbers 水1/6 火2/7 木3/8 金4/9 土5/10. Traditional cultural reference calculation; 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

**Is the relation symmetric?**

No. It is stated from A's point of view: Wood generates Fire, so with A = Fire and B = Wood the type is is_generated_by; likewise controls versus is_controlled_by.

**Which organ tables are used?**

The classical 脏腑 pairing: Wood liver/gallbladder, Fire heart/small intestine, Earth spleen/stomach, Metal lung/large intestine, Water kidney/bladder. These are cultural correspondences, not medical statements.

## Related

- [Stem and Branch Relations (干支合冲刑害)](https://tttkmbb.com/yijing/stem-branch-relations.md) — Combinations and clashes between specific stems and branches.
- [Bagua Trigram Lookup (八卦)](https://tttkmbb.com/yijing/bagua.md) — Element of each trigram.
- [Bazi Four Pillars (八字)](https://tttkmbb.com/lunar/bazi-four-pillars.md) — Five-element balance of a birth chart.
