An I Ching hexagram is a figure of six stacked lines, drawn as either solid (yang) or broken (yin), that the King Wen sequence numbers from 1 to 64. Each hexagram is built from a lower trigram (lines 1 through 3, counted from the bottom) and an upper trigram (lines 4 through 6), so the orientation is non-negotiable: reversing the order swaps the two trigrams and points to a different numbered figure. The standard three-coin casting convention declares heads as 3 and tails as 2, so a single line is the sum of three coin values and only the totals 6, 7, 8, and 9 are possible. Those totals classify the line: 6 is old yin, 7 is young yang, 8 is young yin, and 9 is old yang. Old yin (6) and old yang (9) are changing lines that flip polarity to form the transformed hexagram. A browser-based reading tool can follow that same bottom-first convention locally, generate 18 secure random bits, and identify the primary and transformed hexagrams with their official Unicode English names.

i ching hexagram
i ching hexagram

What an I Ching hexagram actually contains

An I Ching hexagram has three structural layers: six lines, two trigrams, and a number in the King Wen sequence of 64. Each line is either solid (yang) or broken (yin). Lines 1 through 3, counted from the bottom, form the lower trigram, and lines 4 through 6 form the upper trigram. The lower and upper trigrams together point to exactly one hexagram in the King Wen ordering, the conventional Chinese sequence that has been used for centuries and the only sequence recognized by the standard Unicode I Ching Symbols block.

The eight trigram names you will encounter are Heaven, Lake, Fire, Thunder, Wind, Water, Mountain, and Earth. They are referenced by the Stanford Encyclopedia of Philosophy entry on the Chinese philosophy of change as the elemental building blocks of the received 64-hexagram system, and each one corresponds to a literal three-line pattern. Mistaking the bottom-first order swaps the lower and upper trigrams, which can change a hexagram entirely; a mixed-line evidence fixture that resolves to hexagram 64 and transforms to hexagram 18 is used to verify that an implementation gets the orientation right.

The three-coin casting convention, declared

The three-coin method is the most common modern casting convention for the I Ching. The convention must be declared explicitly because the total per line depends on which face value is assigned to heads and which to tails. In the version used here, heads (H) counts as 3 and tails (T) counts as 2, and the six lines of a single cast are recorded from the bottom upward so that the first toss is line 1 and the last toss is line 6 at the top of the figure.

Coin CombinationSumLine TypePolarityChange Behavior
H H H9Old YangYangFlips to yin
H H T (any order)8Young YinYinStable
H T T (any order)7Young YangYangStable
T T T6Old YinYinFlips to yang

Only those four totals are possible with three coins. Because the convention is declared rather than hidden, any reader can check the math in plain sight and any implementation can be checked against it. The UAYA Foundation's introduction to the coin method lays out the same four-way classification and is a common point of reference for readers approaching the method from a browser.

How to cast an I Ching hexagram in your browser

The complete mechanical cast is available in a dedicated browser tool that follows the declared convention above without asking you to submit a question, your name, a birth date, or any contact detail. To generate an I Ching hexagram with the I Ching Reading tool, follow these steps in order.

  1. Confirm the coin convention shown above the controls: heads equal 3, tails equal 2, and the six lines are recorded from bottom to top.
  2. Choose Cast six lines. The browser requests 18 random 32-bit values from the local Web Crypto API; if the call fails or secure randomness is unavailable, the tool reports the failure and does not produce a cast.
  3. Inspect each of the six rows in the result panel: the three coin faces (H or T), the line total (6, 7, 8, or 9), the polarity (yin or yang), and the change state (stable, or changing and into what).
  4. Read the primary hexagram number and its official Unicode English name. The tool looks up the lower and upper trigrams from lines 1 to 3 and lines 4 to 6 in the King Wen matrix, then resolves to exactly one of the 64 numbered figures.
  5. If any line total is 6 or 9, those are changing lines. The tool uses those flips to identify the transformed hexagram and labels it separately.
  6. When you want a fresh cast, choose Reset to clear the current result and return to the initial convention view. The next Cast six lines will start again from line 1 at the bottom.

Every coin face you see was generated locally. There is no upload, no fetch call, no analytics request, no localStorage record, and no history pane; closing the tab or hitting Reset is enough to discard the cast. After a successful cast, the result region receives focus so screen readers can announce the new state.

Changing lines and the transformed hexagram

A primary hexagram with no changing lines stands on its own. Any line whose total is 6 or 9, however, is the seed of a second figure. Old yin (6) is a broken, changing line that flips to solid yang in the transformed cast; old yang (9) is a solid, changing line that flips to broken yin. The young lines, totals 7 and 8, are stable and keep their polarity. The transformed hexagram uses only the flipped lines, so you can read it independently of any wider interpretation you apply to the changing lines themselves.

A single line calculation makes the convention concrete. Suppose the first toss comes up H, H, T. The sum is 3 + 3 + 2 = 8, which classifies the line as young yin: a broken, stable line that does not change into the transformed figure. Replacing one T with an H gives 3 + 3 + 3 = 9, which is old yang, a solid, changing line that flips into yin and contributes a new row to the transformed cast. The same arithmetic governs every line in the reading.

When the cast is empty of changing lines, the transformed panel is intentionally not produced, because there are no flipped rows to assemble. When the cast contains only changing lines, for example six 9s, the transformed hexagram is built by flipping every changing line. The number of changing lines in any single cast is between zero and six, and the tool labels each one visibly in the row strip so you can count them directly from the screen rather than from memory.

Comparing the cast to a reference catalogue

Once the tool has named the primary hexagram, the natural next step is to look it up in a reference catalogue rather than to over-rely on the bottom-line coin sums. The I Ching Hexagram Meanings reference lists all 64 King Wen figures with their official Unicode code point, their English name, their lower and upper trigrams, and their numeric position, without generating a fresh cast or asking for a question. Reading a name back from a catalogue is a separate step from interpreting it; keeping that separation is one of the reasons the cast itself is so explicit about its own math.

If your cast produced a transformed hexagram, look that figure up the same way: by number and Unicode name. The pair of figures is mechanical evidence that at least one line changed polarity under the declared convention, and the catalogue lets you see the structural relationship between the two without needing any one commercial translation to dominate your reading.