Skip to content
Word ChallengeWord Challenge

Wordle research

Inside the Solver: How We Rank Wordle Guesses

Filter, order, measure. The exact pipeline behind the suggestions in our Wordle solver, documented function by function, with published numbers you can check.

Updated July 2026

The short answer

The solver ranks guesses in three stages: filter, order, measure. solveWordle filters the active word list down to the candidates that satisfy every tile you have coloured, rankWords orders those candidates by a letter-frequency score, and once 400 or fewer candidates remain, suggestGuesses measures each one by the Shannon entropy of the feedback patterns it could produce and surfaces the three most informative as the “best next guess”. This page documents that pipeline exactly as it ships, with the real function names, because a recommendation you cannot inspect is just a black box with a nicer grid.

Four small modules do all the work. wordle-solver.ts turns tiles into constraints and filters the list, word-ranking.ts scores letters, wordle-entropy.ts holds the feedback and entropy maths, and wordle-suggester.tsglues the last two together. The same entropy module also generates the opener rankings on our research pages, so you can check the solver’s claims against published numbers.

Stage 1: tiles become constraints, constraints filter words

Every fully filled row of the grid is parsed by extractConstraints into five constraint sets, defined by the ISolverConstraints interface:

  • Correct letters. A green tile pins a letter to a position.
  • Present letters. A yellow tile requires the letter somewhere in the word and records the positions where it appeared yellow, so it can be excluded there.
  • Absent letters. Letters that were grey and never green or yellow anywhere are banned outright.
  • Minimum counts. For each letter, the highest combined green plus yellow count seen in any single row sets a floor. A row proving two copies of E beats a row proving one.
  • Exact counts. A grey tile for a letter that is also green or yellow in the same row pins the count precisely, because Wordle greys the surplus copy.

wordMatchesConstraints then tests every word against all five sets in turn, and solveWordle keeps the words that pass. This stage is pure elimination with no scoring involved, and its output is the candidate list everything else works from. Until you colour at least one tile, hasConstraints short-circuits the whole thing and the full list comes back untouched.

Stage 2: the visible list is ordered by letter frequency

The matching words you see are sorted by rankWords, which calls scoreWord on each candidate. The score is the sum of approximate English letter frequencies hard-coded in the module, with E contributing 0.127, T 0.091 and A 0.082, down to Q and Z at 0.001, multiplied by a uniqueness factor. That multiplier is exactly 1 for a five-letter word with five distinct letters, 0.7 with four distinct letters and 0.4 with three, so repeated letters push a word down the list. The heuristic is deliberately cheap. It runs instantly on any list size and approximates information gain well enough to put probe-friendly words first, which matters because the precise calculation in stage 3 is not always available.

Stage 3: entropy picks the suggested guesses

Letter frequency is a proxy. The real measure, used for the suggestions panel, is expected information. Once the candidate list holds between two and 400 words, suggestGuesses runs the full calculation:

  1. For each candidate guess, feedbackBuckets simulates that guess against every remaining candidate answer. The tile pattern for each pairing comes from feedbackCode, which encodes it as a base-3 number, 0 for grey, 1 for yellow and 2 for green. Three states across five positions gives 243 possible codes.
  2. Candidates that would produce the same pattern land in the same bucket, so each guess partitions the remaining answers into groups, one group per pattern.
  3. shannonEntropy converts the bucket sizes into bits, summing p times log2(1/p) across buckets, where p is the share of candidates in each bucket. Many small, even buckets score high. One dominant bucket scores low.

Here is the partitioning idea in tiles. The same guess produces different patterns against different answers, and every distinct pattern is its own bucket:

If the answer were CRANE, SLATE lands in the bucket for grey, grey, green, grey, green.
If the answer were STAIR, SLATE lands in a different bucket: green, grey, green, yellow, grey.

Notice that the guess is never checked against the true answer, only against the whole candidate set. That is why the solver can score guesses before you have any idea what the answer is, and it is the same construction our entropy explainer walks through in plain English.

Where the guesses come from, and how ties break

The guess pool is the candidate set itself. suggestGuesses only ever proposes words that could still be the answer, which makes every suggestion a legal hard-mode play and gives you a chance of winning on the spot. The honest trade-off is that a word from outside the candidate set can occasionally be a better pure probe, and this solver deliberately never plays one. The hard mode guide covers why answer-capable guesses matter so much under that rule set.

Ties break deterministically. Suggestions sort by entropy first, then by the scoreWord frequency score, then alphabetically, so equal-entropy words with commoner letters win and the output never shuffles between visits. Each suggestion is returned as an IGuessSuggestion carrying the word and its entropy in bits, which is the figure shown beside each suggested word in the tool.

Why suggestions sometimes vanish

The entropy pass is quadratic in the candidate count. At the cap of 400 candidates it simulates 160,000 guess-and-answer pairings synchronously in your browser, which stays comfortably inside a frame budget on a phone. Beyond the cap, suggestGuesses returns nothing by design and the interface falls back to the frequency ordering, because early in a game almost any high-coverage word is informative and an exact ranking adds little. With one candidate left there is nothing to rank, so the panel disappears then too.

Duplicate letters, the part most solvers get wrong

The correctness-critical piece of all this is the duplicate handling inside feedbackCode, which follows the official rules exactly. Greens claim their copies of a letter first, then yellows consume whatever copies remain, and any further repeats go grey. Watch SASSY, which contains three copies of S, played against CRASS, which contains two:

The green S claims one copy, the opening S takes the last remaining copy as yellow, and the middle S goes grey.

The filtering side mirrors this with the minimum and exact count constraints from stage 1, so a grey-plus-green pair of the same letter removes every word holding two copies. For how often repeats actually appear in the answer set, see the duplicate letters research.

Curated answers or every valid guess

By default the solver searches the curated list of 1,352five-letter words the game can actually pick as an answer. The “Show all valid words” toggle lazy-loads the extended list of 15,783 valid guesses instead. Filtering and frequency ranking behave identically on both, but the entropy pass activates far sooner on the curated list, simply because the extended candidate set stays above the 400-word cap for longer. Extended mode earns its place when you suspect an unusual word, or when you are using the solver for a five-letter puzzle other than Wordle. On the curated list, every suggestion is drawn from genuine possible answers.

The same maths, run over the whole dictionary

wordle-entropy.tsis a dependency-free module shared by the in-browser suggester and the offline script that precomputes opener rankings into our database. That is deliberate. The feedback simulation is the easiest place for two implementations to quietly disagree, so there is only one. The table below is the shared code’s output: the ten highest-entropy opening guesses from the full dictionary, bucketed against the curated answer set. The “average answers left” column is the probability-weighted mean bucket size, computed by expectedRemaining as the sum of squared bucket sizes divided by the total.

For scale, the whole game holds about 10.4 bits of uncertainty, and TARES extracts 6.22 of them with the very first guess, leaving roughly 28 candidates on average.

#WordEntropy (bits)Avg. answers leftUnique letters
1TARES6.22285
2LARES6.14285
3TALES6.13305
4SALET6.12305
5TEARS6.12315
6SAITE6.11315
7RATES6.10295
8ARIES6.10275
9RALES6.09295
10ARLES6.09285

The full ranking, including hard-mode pools and duplicate-aware columns, lives on the best starting words page, and the letter frequency data shows the raw distributions the stage 2 heuristic approximates.

What this solver is not

Three limits are worth stating plainly. The suggester is a one-step greedy heuristic that maximises expected information for the next guess only, not a full game-tree search that minimises guesses to the end of the game. It scores only words that could still be the answer, so it never sacrifices a turn on an outside probe. And above the candidate cap it leans on letter frequency rather than entropy. Each limit is a deliberate trade for speed, hard-mode safety and explainability in a tool that runs entirely in your browser. Try it against your own grid on the Wordle Solver, colour the tiles, and watch the candidate list and suggestions update exactly as described above.

Frequently asked questions

Which word list does the solver search by default?

The default list is the curated set of 1,352 five-letter words the game can actually choose as an answer. The extended list of 15,783 valid guesses loads only when you press the toggle, so the first results you see are always genuine answer candidates.

How does the solver pick its suggested guesses?

It plays every remaining candidate against every other remaining candidate, groups the outcomes by the exact tile pattern each pairing would produce, and measures the Shannon entropy of that grouping. The three candidates with the highest entropy become the suggestions, because they split the remaining words most evenly.

Why do the suggestions sometimes disappear?

The entropy pass runs only when between two and 400 candidates remain. Below two there is nothing to rank, and above the cap the quadratic simulation would be slow in the browser while adding little, since almost any strong word is informative early on. The results list is still ordered by the letter-frequency score in that range.

Are the suggestions safe to use in hard mode?

Yes. Suggestions are drawn only from words that already satisfy every green, yellow and grey clue on your grid, so each one is a legal hard-mode play and could itself be the answer.

How does the solver handle duplicate letters?

In two places. The feedback simulation follows the official rules, greens claim their copies of a letter first and yellows consume whatever copies remain, so surplus repeats go grey. The filter separately tracks minimum and exact letter counts, which is how a grey tile beside a green of the same letter correctly rules out words with two copies.

Is this the same calculation as the opener rankings?

Yes. The feedback and entropy functions live in one shared module used by both the in-browser suggester and the offline script that precomputes the opener tables, so the two can never quietly drift apart.

Why is the results list in a different order from the suggestions?

The visible list is sorted by a fast letter-frequency score so it stays instant at any size. The suggestions come from the entropy calculation, which is slower but measures information directly. When both are shown, the suggestion panel is the better guide.