Skip to content
Number Puzzle Game

24 Game Solver

Find distinct exact solutions or get just the first move.

Starting numbers

Enter your numbers or choose a preset to get started.

Classic hard presets

Classic fractional puzzles and answers

Starting tilesExact solution
3, 3, 8, 88 ÷ (3 − 8 ÷ 3) = 24
1, 3, 4, 66 ÷ (1 − 3 ÷ 4) = 24
1, 5, 5, 55 × (5 − 1 ÷ 5) = 24
4, 4, 7, 7(4 − 4 ÷ 7) × 7 = 24
3, 3, 7, 7(3 + 3 ÷ 7) × 7 = 24
1, 4, 5, 64 ÷ (1 − 5 ÷ 6) = 24
2, 5, 5, 10(5 − 2 ÷ 10) × 5 = 24
2, 7, 7, 10(2 + 10 ÷ 7) × 7 = 24
1, 6, 6, 86 ÷ (1 − 6 ÷ 8) = 24
2, 3, 5, 1212 ÷ (3 − 5 ÷ 2) = 24

What an exact solver checks

Enter 4 integers from -999 through 999. The default target is 24, and you can enter any target from 1 through 999. Each starting number occupies one position, even when two positions have the same value. A valid expression uses all four positions exactly once and may group them with parentheses. The only operators are +, −, ×, ÷.

The solver joins pairs of expressions until it reaches a single expression for the whole hand. It tries both possible orders when subtracting or dividing. A branch ending in division by zero is discarded. Zero itself can appear in another valid calculation, where its presence can change which expressions are reachable without making an undefined operation.

Every calculation is stored as a numerator and a denominator using integers of arbitrary precision. For example, eight divided by three is stored as 8/3. The subtraction that follows uses that precise ratio. This avoids rounding errors associated with IEEE-754 floating point, especially when a repeating decimal would otherwise be compared with an exact integer target.

How equivalent expressions are grouped

An exhaustive search can produce many descriptions of the same calculation. Reordering two terms in a sum, or moving parentheses within an additive group, does not create a distinct mathematical route. The result list groups those expressions. It records the terms on the positive and negative sides separately and sorts them into a stable representation.

Products work similarly. Factors in the numerator and denominator are tracked separately, so a rearrangement within either group has a stable identity. Parentheses keep groups intact when switching between addition and multiplication. A sum underneath a fraction bar still needs to be calculated as a sum before the division.

The grouping rule preserves genuinely different structures. It does not expand a product across a sum or cancel a pair of terms out of the witness. Retaining every leaf matters when the puzzle requires each number to be used once. Before an answer is displayed, its expression is parsed again, evaluated as an exact fraction, and checked against the original four-number multiset.

Try a first move before you reveal the answer

Enable Spoiler-Free Hint and solve the current hand. You will see one binary operation and the three values remaining after it. If there is a route with whole-number intermediate results, the hint prefers it. Otherwise, the step can reveal a useful fraction. It keeps the rest of the calculation behind the reveal control so you can try the new position on your own.

  1. Enter the four numbers and leave the target at 24 for a standard hand.
  2. Enable Spoiler-Free Hint before solving if you want to see one move at a time.
  3. Use the three remaining values to work toward the target. Reveal the list when you want to compare complete routes.
  4. Choose a preset to load a different hand. The reference table contains worked answers, so skip it if you want to solve the presets yourself.

The preset with two threes and two eights is a good exercise in working backward. To get 24 from eight by division, you need a denominator of one third. If you make eight thirds from an eight and a three, you can subtract it from the remaining three. Dividing by the resulting one third uses the last eight and reaches the target exactly.

Read the fraction labels

A fraction label describes the displayed route. It means the sequence uses at least one result that is not a whole number. Another answer for the same hand can have different intermediate values. Some hands have a straightforward whole-number answer, while the presets in the table illustrate how a non-integer intermediate can unlock a short expression.

When a hand has no solution, check whether all its numbers and the target match what you intended to enter. If they do, treat the empty result as a property of that particular hand under the four-number rules. You can still explore how changing one number alters the reachable targets, or play the daily four-number puzzle for a board checked to have an exact route.

For a different kind of practice, try Digits Game. There you can stop after using only some of the starting numbers, and every intermediate value must be a positive whole number. Comparing the two games makes it easier to recognize when a fractional result is a useful choice and when you need a different plan.

Frequently asked questions

What numbers can I enter?

Enter 4 integers between -999 and 999. The target defaults to 24 and can be set from 1 to 999.

Does the solver round intermediate fractions?

No. It keeps reduced integer numerators and denominators so repeating fractions stay exact.

Why are some rearrangements missing?

The solver groups equivalent additive terms and multiplicative factors. Rearranging them does not add a result.

What does the first-step hint show?

It shows one operation and the remaining values. The full solution list stays hidden until you reveal it.

Can a hand have no solution?

Yes. Some combinations cannot reach the chosen target while using all four tiles and the permitted operations.

Do all answers use every starting tile?

Yes. The solver checks the expression against the full input multiset, including duplicates.

The exact fraction equation 8 ÷ (3 − 8 ÷ 3) = 24 on graph paper.