The Magic Codex

Countdown Solver

Six numbers, one target — find the exact solution or the closest reachable value, with the full expression shown.

Your 6 numbers

Classic rules: each number at most once; intermediates must stay positive integers; division only when exact.

How to use the Countdown Solver

  1. Enter your 6 numbers and the target — or hit Random game for a classic-style deal (4 small, 2 large).
  2. Hit Solve. The search is exhaustive and instant.
  3. Read the headline — 🎯 Exact! means the target was hit dead on; otherwise you get the closest reachable value and its distance — then follow the expression inside out.

Playing it by hand

The two skills that win numbers games are factor hunting and gap thinking. Factor hunting: if the target is even, look for a way to build half or a third of it and double or triple at the end. Gap thinking: once you're near the target, stop building big and hunt the difference — a spare 6 − 2 or 25 ÷ 5 closes small gaps cleanly. Large numbers (25, 50, 75, 100) are multipliers first, addends second.

Why "closest" is a proof, not a guess

Because the solver explores every legal combination of your numbers — every pair, every operation, every order — its answer is complete. When it says the best you can do is 4 away, that is a mathematical fact about your numbers under the classic rules, not a failure of imagination. Use it to settle arguments about whether a game was winnable.

What are the rules of the Countdown numbers game?
You get 6 numbers and a target between 1 and 999. Using each number at most once, combine them with +, −, ×, and ÷ to get as close to the target as you can. Intermediate results must stay positive — no negative numbers and no fractions, so division only counts when it comes out exact.
Do I have to use all six numbers?
No. Any subset works — sometimes the target falls with just two or three numbers, and forcing in the rest only makes it harder.
How does the solver find the answer?
It tries every legal way of combining the numbers, pair by pair: for each pair it applies addition, subtraction (larger minus smaller), multiplication, and exact division, then repeats with the results. States that reach the same set of values are only explored once, which keeps the exhaustive search instant.
What does “exact!” mean?
The solver hit your target dead on — the expression shown builds the target precisely from your numbers. Anything else shows the closest reachable value and how far off it is.
Can the solver prove no exact solution exists?
Yes — because the search is exhaustive, if it reports the closest value is 4 away, no combination of your numbers can do better under the rules.
How do I read the expression?
Inside out, following the parentheses. In ((75+25)×6)÷3: add 75 and 25 to get 100, multiply by 6 to get 600, divide by 3 to get 200. Every step uses numbers you were given, each at most once.
Is my input sent anywhere?
No. The search runs entirely in your browser with JavaScript. Nothing is uploaded, stored, or tracked.

Need help with this tool?

Found a bug, or have a suggestion for the codex? Write to us — a real human reads every message.

[email protected]

More from the codex