Daily hexagram
Pick the hexagram of the day from a fixed date-to-index rule, so consecutive days never repeat and 64 days cover every hexagram once. The lines and names come from the same table as the hexagram reference.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Hexagram of the day
Index = (day number × 61) mod 64 + 1 · the same date always gives the same hexagram
Enter a date to cast the hexagram
What this tool does
- Derive the hexagram of a day with a fixed rule: index = (day number × 61) mod 64 + 1, with lines and names taken from the same 64-hexagram table used by the hexagram reference — the same date always gives the same hexagram.
- You also get the six lines (bottom-up, 1 = yang, 0 = yin), the changing line written the I Ching way (九二, 六三, 初九, 上六) and a short action note.
- Tick "Next 7 days" to see the coming week: 61 and 64 are coprime, so neighbouring dates never repeat and 64 days walk through all 64 hexagrams once.
- The whole result can be copied as plain text.
Example
Input
1990-06-15
Output
日期 / Date: 1990-06-15 今日卦 / Hexagram: 第 55 卦 丰 六爻 / Lines(下起): 101100 变爻 / Changing line: 初九(第 1 爻) 行动建议 / Advice: 盛极当收:成绩已经够好,稳住就行。 未来 7 天 / Next 7 days: 1990-06-15 第 55 卦 丰 1990-06-16 第 52 卦 艮 1990-06-17 第 49 卦 革 1990-06-18 第 46 卦 升 1990-06-19 第 43 卦 夬 1990-06-20 第 40 卦 解 1990-06-21 第 37 卦 家人 说明 / Notes: 卦序由日期确定((天数 × 61) mod 64 + 1),相同日期永远得到同一卦;内容为传统文化娱乐,不构成任何决策依据。
Real output for this date; the lines come from the same table as the hexagram reference tool.
Frequently asked questions
Can I use this for divination or decisions?
No. The hexagram is a pure function of the calendar date with no randomness at all — it is traditional-culture entertainment, not a prediction or advice, and must not drive investment, medical or legal decisions.
Where does the index come from, and why is it never repeated within 64 days?
Index = (day number × 61) mod 64 + 1, where the day number is the continuous day count of the Gregorian date. Since 61 and 64 are coprime, every 64 days walks through all 64 hexagrams exactly once and two consecutive days never collide.
How do I read the six lines?
Lines are listed bottom-up: 1 is a yang line, 0 a yin line, so Qian is 111111 and Kun is 000000. Changing-line notation follows the I Ching: the first and sixth lines put the position character first (初九, 上六), lines two to five put the yin/yang character first (九二, 六三, 九四, 六五).
Which dates are supported?
Only 1900-01-01 through 2100-12-31 are converted to day numbers, with standard Gregorian leap-year rules (including the non-leap century years 1900 and 2100). Outside the range you get an "out of range" message instead of a guess.
Is the date I look up uploaded?
No. Everything runs locally in the browser with no network requests and no storage writes.
Keywords:daily hexagram