HomeI Ching & Five Elements › Liu Yao Hexagram Chart (六爻)

Liu Yao Hexagram Chart (六爻)

Builds the full Liu Yao (six-lines coin oracle) chart for six cast lines: original and changed hexagrams, the 京房 palace with 世/应 lines, the 纳甲 stem-branch of every line, six relatives (六亲) against the palace element, six beasts (六神) from the day stem, void branches (旬空), day and month relations and hidden lines (伏神).

When to use

You have six lines cast with three coins (or as 0/1 digits with moving positions) and need the traditional 六爻 chart for a given day, including 纳甲, 六亲, 六神, 世应, 旬空, 月破 and 伏神.

Do not use when: You want to cast a hexagram from a time or numbers (use meihua-yishu), or only need the structural change of lines without the calendar layer (use hexagram-change).

Formula

Line value 7/9 = yang, 6/8 = yin; 6 and 9 move (变爻) and flip in the changed hexagram. Palace: pure hexagram, then lines 1–5 flipped in turn (一世 … 五世, 世 = the flipped line), line 4 flipped back (游魂, 世 4) and the inner trigram restored (归魂, 世 3); 本宫 世 = 6; 应 = 世 ± 3. 纳甲: 乾 甲子·寅·辰 / 壬午·申·戌, 坎 戊寅·辰·午 / 申·戌·子, 艮 丙辰·午·申 / 戌·子·寅, 震 庚子·寅·辰 / 午·申·戌, 巽 辛丑·亥·酉 / 未·巳·卯, 离 己卯·丑·亥 / 酉·未·巳, 坤 乙未·巳·卯 / 癸丑·亥·酉, 兑 丁巳·卯·丑 / 亥·酉·未. 六亲 = branch element vs palace element (same 兄弟, generates 父母, generated 子孙, controls 官鬼, controlled 妻财). 六神 start by day stem (甲乙 青龙, 丙丁 朱雀, 戊 勾陈, 己 螣蛇, 庚辛 白虎, 壬癸 玄武) in the order 青龙 朱雀 勾陈 螣蛇 白虎 玄武 from line 1. 旬空 = the two branches after the ten days of the day's 旬.

Rules follow the 京房 palace system and the Qing textbook 增删卜易; the day, month (solar-term based) and hour pillars come from the shared calendar core in China Standard Time. Changed-line relatives are judged against the original palace; 三刑, 三合 and 六害 are not evaluated. Traditional reference calculation from the Chinese divination and numerology literature: it reports what the tradition assigns to the cast or number, not a prediction and not medical, legal or financial advice.

Inputs

ParameterTypeUnitRequiredDescription
linesstringyesSix digits from the bottom line up: 6 = 老阴 (moving yin), 7 = 少阳, 8 = 少阴, 9 = 老阳 (moving yang). Six 0/1 digits (1 = yang) are also accepted together with moving_lines.
moving_linesstringnoOptional comma-separated positions 1–6 of moving lines (needed with 0/1 input, added to any 6/9 lines), e.g. "1,4".
datedatedefault todayCivil date of the cast in China Standard Time (UTC+8), 1900–2100; sets the day and month pillars.
timestringnoOptional clock time HH:MM for the hour pillar.

Outputs

OutputTypeUnitDescription
original_hexagramstringKing Wen number, full Chinese name, symbol, pinyin and Wilhelm title.
original_linesstringSix digits bottom→top, 1 = yang, 0 = yin.
changed_hexagramstringHexagram after all moving lines change, or "none" when no line moves.
palacestring京房 palace and the hexagram's position in it (本宫, 一世 … 五世, 游魂, 归魂).
palace_elementstringFive-element of the palace, the reference for the six relatives.
shi_lineintegerPosition of the 世 (self) line, 1 = bottom.
ying_lineintegerPosition of the 应 (other) line, three lines from 世.
day_ganzhistringSexagenary day of the cast.
month_ganzhistringSexagenary month by solar terms (节).
hour_ganzhistringSexagenary hour when a time is given (五鼠遁 from the day stem).
void_branchesstringThe two branches missing from the day's ten-day 旬.
lines_tablelistOne row per line bottom→top: position, line_type, najia (纳甲), element, six_relative (六亲), six_beast (六神), is_shi, is_ying, moving, changed_najia and changed_six_relative (moving lines only), void (旬空), day_relation (同/冲/合 with the day branch) and month_relation (旺相休囚死 vs the month branch, plus 月破).
fu_shenstring_listFor each of the five relatives absent from the hexagram: the line of the palace's pure hexagram (本宫卦) that carries it, with its 纳甲, position and the covering line (飞神).
disclaimerstringCultural framing of the result.

Example

Six unchanging yang lines (777777) on 2026-09-24: {"lines":"777777","date":"2026-09-24"}{"original_hexagram":"1 乾为天 ䷀ (Qian, The Creative)","changed_hexagram":"none","palace":"乾宫 (Qian palace), 本宫卦","palace_element":"金 Metal","shi_line":6,"ying_line":3,"day_ganzhi":"辛丑 (Xinchou)","month_ganzhi":"丁酉 (Dingyou)","void_branches":"辰巳 (Chen, Si)","lines_table":[{"najia":"甲子 (Jiazi)","six_relative":"子孙 Children","six_beast":"白虎 White Tiger","void":false,"day_relation":"合 (combines with day branch 丑)"},{"najia":"甲寅 (Jiayin)","six_relative":"妻财 Wife-Wealth","six_beast":"玄武 Black Tortoise","month_relation":"死 (Si, dead)"},{"najia":"甲辰 (Jiachen)","six_relative":"父母 Parents","six_beast":"青龙 Azure Dragon","void":true},{"najia":"壬午 (Renwu)","six_relative":"官鬼 Officials-Ghosts","six_beast":"朱雀 Vermilion Bird"},{"najia":"壬申 (Renshen)","six_relative":"兄弟 Siblings","six_beast":"勾陈 Hook Array","month_relation":"旺 (Wang, prosperous)"},{"najia":"壬戌 (Renxu)","six_relative":"父母 Parents","six_beast":"螣蛇 Flying Serpent","is_shi":true}]}

797878 (line 2 moving) on 2025-01-01: {"lines":"797878","date":"2025-01-01","time":"10:30"}{"original_hexagram":"5 水天需 ䷄ (Xu, Waiting)","changed_hexagram":"63 水火既济 ䷾ (Ji Ji, After Completion)","palace":"坤宫 (Kun palace), 游魂卦","palace_element":"土 Earth","shi_line":4,"ying_line":1,"day_ganzhi":"庚午 (Gengwu)","month_ganzhi":"丙子 (Bingzi)","hour_ganzhi":"辛巳 (Xinsi)","void_branches":"戌亥 (Xu, Hai)","lines_table":[{"najia":"甲子 (Jiazi)","six_relative":"妻财 Wife-Wealth","six_beast":"白虎 White Tiger","day_relation":"冲 (clashes with day branch 午)"},{"najia":"甲寅 (Jiayin)","six_relative":"官鬼 Officials-Ghosts","moving":true,"changed_najia":"己丑 (Jichou)","changed_six_relative":"兄弟 Siblings"},{"najia":"甲辰 (Jiachen)","six_relative":"兄弟 Siblings"},{"najia":"戊申 (Wushen)","six_relative":"子孙 Children","is_shi":true},{"najia":"戊戌 (Wuxu)","six_relative":"兄弟 Siblings","void":true},{"najia":"戊子 (Wuzi)","six_relative":"妻财 Wife-Wealth","month_relation":"旺 (Wang, prosperous)"}],"fu_shen":["父母 Parents: 伏神 乙巳 (Yisi, 火 Fire) at line 2 of 本宫卦 坤为地, under 飞神 甲寅 官鬼 Officials-Ghosts"]}

GET https://tttkmbb.com/api/v1/calculate/liuyao?lines=777777&date=2026-09-24

Machine access

Sources

FAQ

How do I enter coin throws?

For each throw from the bottom line up, add the coin values (heads 3, tails 2): 6 = old yin (moving), 7 = young yang, 8 = young yin, 9 = old yang (moving). Enter the six digits bottom first, e.g. 797878.

Which month is the 月建?

The solar-term month (寅 from 立春, 卯 from 惊蛰 …), not the lunar month, because Liu Yao judges strength by the 节气 calendar. 月破 marks a line whose branch clashes with the month branch.

What is a 伏神?

When one of the five relatives is absent from the six lines, it is 'hidden' under the line at the same position of the palace's pure hexagram; the covering line is the 飞神. The chart lists every absent relative with its hidden 纳甲.

Related calculators