This tool analyses and solves numbers games according to the rules of the TV
Enter a selection of numbers separated by spaces, and an optional target, in
the boxes above. Then press enter or click Go.
The selection is conventionally six numbers, but you can enter between two and
eight. All the numbers in the selection and target (if given) must be positive
If you enter a target, you'll see all the non-trivially different solutions for
that target, and the solution counts for nearby targets.
If you don't enter a target, you'll see a map of all the targets (100-999) at
once, colour coded by solveability with the given selection. Click on any
target to see the solutions for it.
If you're using a mobile device, you might find
this interface easier to use, but it
doesn't have all the same features.
Shortcuts and special commands
The following shortcuts may be included in the selection box to modify the
behaviour and to solve for more complicated variants of the game.
||Equivalent to 100 75 50 25.
4L 6 3 expands to
100 75 50 25 6 3.
||Use the fast solver (see below) even if there are fewer than 8 numbers
in the selection.
||Use the fast solver and only show solutions for the specific target,
not other targets. This is the default if there are more than 7 numbers
in the selection. This improves speed and memory consumption even
more than fast.
||Force the solver to show solutions for all targets even if 8 numbers
are given. This still uses the fast solver, so only one solution will
be given per possible target.
as the target. Useful if you don't want the hassle of moving
all the way over to the other box to type the target.
||A solution must use at least x
of the numbers in the selection to be valid. By default there is no
minimum. This option is not compatible with the
||A valid solution may not use more than x
of the numbers in the selection. By default there is no maximum.
||Any number preceded with L
is "locked", which means a solution must use it to be valid. Any
or all of the numbers in the selection may be locked.
This is not compatible with the
This solver generates all legal expressions that can be made from the starting
numbers, subject to some optimisations. It keeps the expressions that reach
the target, or if it's not possible to reach the target, the expressions that
get the closest to it.
The solver should solve every puzzle perfectly. If you find a solution to a
puzzle which the solver claims is impossible, or you find a closer solution
than the closest one it finds, then that's a bug.
The rules are as used by the numbers round on Countdown. The object of the game
is to use the starting numbers and any combination of addition, subtraction,
multiplication or division to reach the target number or as close as possible
You don't have to use all the numbers, but each number may be used only once.
Only positive integers may be used at any stage of the calculation. Negative
numbers, powers and fractions are not allowed.
If you enter seven or fewer numbers in the selection, the solver will give
you all the non-trivially different solutions for a given target. The solver
considers two expressions to be equivalent, and therefore not different
solutions, if both expressions do the same operations on the same numbers when
their operations are rearranged into a standard order. This means you don't get
all the trivial rearrangements of the same solution.
If you enter eight numbers in the selection, we use the "fast" solver to save
time and memory. This agressively eliminates duplicate expressions by
considering two expressions to be equivalent if they reach the same target
with the same starting numbers. We also only show the results for the requested
target rather than all the nearby targets, which further improves speed and
To find solutions for all targets with eight numbers, use the
all keyword. This will take longer
and may show significant memory consumption. It still uses the fast solver,
which gives you a maximum of one solution for each target and cannot tell you
if this is the only solution or what other solutions may exist.
Provided there is no minimum number of numbers to use
and there are no locked numbers, trivially redundant operations which are never
useful in the game are always ignored and not included in the expression. This
includes introducing more operations to an expression after it has reached the
target, multiplying or dividing by 1, or any part of an expression being
equivalent to 2x − x or x² / x.
This solver was written by Graeme Cole and is released under the
3-Clause BSD Licence. The source code is
available on GitHub.
It is not affiliated with or endorsed by Countdown or anyone connected with the