Cast a random hexagram from the Book of Changes. 64 six-line figures, 3,000 years of wisdom.
The I Ching (Yìjīng, 易經) is a divination text and philosophical treatise originating in Western Zhou dynasty China around 1000 BCE, with roots reaching back to the legendary sage-king Fu Xi. Its 64 hexagrams form a complete combinatorial system: six binary lines stacked vertically, each either solid (yang, ━) or broken (yin, ╍), producing every possible arrangement of two states across six positions. This tool generates one of these 64 figures at random, drawn from your browser's cryptographic entropy source.
Each hexagram decomposes into two trigrams of three lines: a lower (inner) trigram and an upper (outer) trigram. The eight trigrams represent fundamental natural forces: Heaven (☰), Earth (☷), Water (☵), Fire (☲), Thunder (☳), Wind (☴), Mountain (☶), and Lake (☱). Their 64 pairwise combinations encode relationships between these forces. The interplay of upper and lower trigrams gives each hexagram its distinctive character and counsel.
In 1703, Gottfried Wilhelm Leibniz published his paper on binary arithmetic and was astonished to discover that the I Ching had encoded the same system millennia earlier. The 64 hexagrams, when arranged in Fu Xi's Earlier Heaven sequence, correspond exactly to the binary numbers 0 through 63. Six binary digits (bits) yield 26 = 64 combinations. Every modern computer processes information in the same binary language that Fu Xi mapped onto broken and unbroken lines. The I Ching is, in a precise mathematical sense, the oldest binary dataset in human history.
The ancient yarrow-stalk method involves 50 dried stalks manipulated through a precise 18-step algorithm to determine each of the six lines. The three-coin method, developed during the Han dynasty, is faster: three coins are tossed simultaneously, and the combination of heads and tails determines whether a line is yin or yin, yang or yang. Both methods produce weighted probabilities that favor stable lines over changing ones. This tool uses uniform probability across all 64 hexagrams, giving each the same 1/64 (≈ 1.56%) chance.
The I Ching offers a vivid entry point for teaching combinatorics, binary number systems, and the history of mathematical thought. Cast several hexagrams as a class, decompose each into its upper and lower trigrams, and convert the six binary lines to a decimal number. The discovery grid on this page tracks which of the 64 hexagrams you have encountered. Ask students to predict how many casts are needed to discover all 64. The answer involves the coupon collector problem, a classic probability question: approximately 64 × ln(64) + 64γ ≈ 282 casts on average.
Every hexagram on this page comes from your browser's Web Cryptography API. The server delivers the page and the hexagram database. Your device selects the random figure. No casts are stored on any server, and no cookies are set. Share the URL freely: each visitor receives an independent random hexagram from the same set of 64.
Send this link. Every visitor casts their own independent hexagram.
Daily Inspiration
Jury-selected work from the A' Design Award, presented fresh each morning.