24 Game Solver

    How to use the 24 game solver

    Type the numbers on your cards, separated by spaces, and press Solve. It lists every way to make 24 with + − × ÷ and brackets, using each number exactly once, or says plainly that it cannot be done. Change the target to play with any number, and use two to six numbers, not just four. Deal me a hand gives you four cards, ace to king, that can always be made, so you can try first.

    The rules of the 24 game

    Four cards are turned over, aces counting as 1 and picture cards usually as 11, 12 and 13, though some players take them out. Use each number once, with adding, subtracting, multiplying, dividing and brackets, to make exactly 24. Fractions along the way are allowed: that is the whole trick of the hardest hands.

    The hardest 24 game hands

    A few hands have only one answer, and it goes through a fraction. 3 3 8 8 is the famous one: 8 ÷ (3 − 8 ÷ 3) = 24, because 3 − 8/3 is a third. 1 5 5 5 is 5 × (5 − 1 ÷ 5); 3 3 7 7 is 7 × (3 + 3 ÷ 7); 4 4 7 7 is 7 × (4 − 4 ÷ 7); and 1 3 4 6 is 6 ÷ (1 − 3 ÷ 4). Each was found by this page's own search, which works in exact fractions so that a sum that only comes to 23.9999 in a computer's arithmetic is never passed off as 24.

    Of the 1,820 different hands of four cards from ace to king, 1,362 can make 24 and 458 cannot. The solver counts the same, having tried every hand.

    How the 24 game solver works

    Take any two of the numbers left and combine them in every possible way, add, subtract either way round, multiply or divide either way round, and you have one fewer number. Repeat until one number is left, and check whether it is the target. That covers every possible bracketing, which is why a solver can say "it cannot be done" with certainty. Answers that only swap the order of a sum or a product are listed once.

    More number puzzles

    The cryptarithm solver works out SEND + MORE = MONEY, the matchstick puzzle solver fixes equations made of matches, and the KenKen solver fills grids by arithmetic. For a puzzle you hold in your hands, see our brain teasers. There are more solvers on the puzzle tools page.

    Frequently Asked Questions

    How do you make 24 with 3, 3, 8, 8?

    8 ÷ (3 − 8 ÷ 3) = 24. Three minus eight thirds is one third, and 8 divided by a third is 24. It is the only answer.

    What are the rules of the 24 game?

    Use each of the four numbers once, with adding, subtracting, multiplying, dividing and brackets, to make exactly 24. Fractions along the way are allowed.

    Can every 24 game hand be solved?

    No. Of the 1,820 different hands of four cards from ace to king, 1,362 can make 24 and 458 cannot. 1, 1, 1, 1 is the simplest that cannot.

    What are the hardest 24 game hands?

    The ones whose only answer goes through a fraction: 3 3 8 8, 1 5 5 5, 3 3 7 7, 4 4 7 7 and 1 3 4 6 are famous examples. The solver shows each one.

    Can it make numbers other than 24?

    Yes. Change the target to any number and use from two to six numbers; it finds every way, or says it cannot be done.