24 game solver

Enter four numbers or cards and see every different way to make 24 with +, −, × and ÷, each one worked out step by step. Use 3 to 6 numbers and any target if you like.

Your numbers

Type 1 to 13, or card letters: A = 1, J = 11, Q = 12, K = 13. From 3 to 6 numbers, any target.

Solutions

How to use the 24 game solver

Type your four numbers into the boxes. Card letters work too: A is 1, J is 11, Q is 12 and K is 13. The 24 game solver answers as you type and lists every distinct solution; open any line to see the calculation one step at a time. Deal 4 random cards draws from a shuffled 52-card deck so you can practice, and Copy link to this puzzle under the tool saves your numbers in a link you can send to someone.

Want a harder game? Add a fifth or sixth number with + Number, or change the target. The same search runs for any target from small numbers to large ones.

The rules of the 24 game

  • Use each of the four numbers exactly once.
  • Combine them with addition, subtraction, multiplication and division, with as many brackets as you need.
  • The result must be exactly 24.

Most house rules allow fractions along the way (8 ÷ 3 is fine as long as the final answer is 24). If your group plays with whole numbers only, tick Only show solutions without fractions along the way.

How the solver works

The solver does not guess. It works out every value that each group of your numbers can make, using exact fractions instead of decimals, so 8 ÷ 3 is kept as 8/3 and never rounded. It then rebuilds every expression that lands exactly on the target.

Many expressions are the same solution written differently: 6 × 4 × 1 and 1 × 4 × 6, or 8 − (3 − 1) and 8 − 3 + 1. The solver puts each expression into a standard form (it sorts the terms of every sum and every product and removes brackets that do not change anything), and lists each standard form once. Expressions that are equal for any other reason are listed separately: multiplying by 1 and dividing by 1 count as two solutions, because you would say them differently at the table. Every answer is printed with the fewest brackets that still give the right result.

Worked example: 3, 3, 8, 8

This is one of the best-known hard sets. Adding and multiplying get you nowhere: 8 × 3 = 24 but then the other 3 and 8 are left over. The only solution is 8 ÷ (3 − 8 ÷ 3):

  1. 8 ÷ 3 = 8/3
  2. 3 − 8/3 = 1/3
  3. 8 ÷ 1/3 = 24

The trick is to build a small fraction and divide by it. The same idea solves 1, 5, 5, 5: (5 − 1 ÷ 5) × 5 = 24/5 × 5 = 24.

How many 24 game hands can be solved?

With numbers from 1 to 13 there are 1,820 different sets of four (order does not matter, repeats allowed). The solver checked all of them: 1,362 of the 1,820 sets can make 24 and 458 cannot. Only 16 of the solvable sets need a fraction along the way (3 3 8 8, 1 5 5 5, 3 3 7 7 and 4 4 7 7 are among them); the other 1,346 have at least one solution with whole numbers only. 396 sets have exactly one distinct solution.

Every unsolvable set has its reason listed when you enter it. Often the numbers are simply too small (1, 1, 1, 1 can reach 4 at most); otherwise the solver shows the closest results above and below 24.

Tips for finding 24 yourself

  • Look for factor pairs first: 3 × 8, 4 × 6, 2 × 12. If two of your numbers can make 3 and the other two make 8, you are done.
  • Use a 1 to adjust: multiply or divide by it to use it up without changing anything.
  • Try 24 = 25 − 1, 23 + 1 or 26 − 2 when products do not fit.
  • When nothing works with whole numbers, try making a fraction and dividing by it.

The Countdown numbers game solver works the same way with six numbers and a three-digit target. For letters that stand for digits, try the cryptarithm solver.

Solver tested . Found a problem? Tell us.

Questions

Is every set of four numbers solvable in the 24 game?

No. Of the 1,820 sets of four numbers from 1 to 13, 458 cannot make 24 at all, for example 1, 1, 1, 1 or 1, 1, 2, 2. Enter any set and the solver tells you whether it works and, if not, how close you can get.

Are fractions allowed in the 24 game?

In most versions, yes: only the final answer must be 24. Some sets, such as 3, 3, 8, 8 and 1, 5, 5, 5, can only be solved with a fraction along the way. Tick the whole-numbers box to hide those solutions.

What numbers do the face cards stand for?

The usual rule is ace = 1, jack = 11, queen = 12 and king = 13. Some groups remove the face cards or count them as 10; just type the numbers you play with.

Why are some solutions that look different not listed twice?

Swapping the order of a sum or a product, or regrouping it, gives the same solution: 4 × 6 and 6 × 4 are one answer. The solver lists each distinct solution once and writes it with the fewest brackets.

Can I use more than four numbers or a target other than 24?

Yes. Use + Number to go up to six numbers and change the target box. The same exact search runs, so the list is still complete; with six numbers it shows the first 400 solutions.

Can I use powers, square roots or factorials?

Not in this solver. It follows the standard rules: addition, subtraction, multiplication and division only, each number used once.