The 24 Game is a mathematics puzzle: given four whole numbers and the four basic operations, find an expression that equals exactly 24. A "24 game solutions" search returns working expressions that use each number once, combined with addition, subtraction, multiplication, division, and parentheses, with no concatenation, exponentiation, factorials, roots, or reused digits. The 24 Game Solver follows that rule set exactly. It accepts four integers from 1 through 99, searches every legal pairing and grouping with exact fractions instead of binary floating-point math, and reports up to 50 expressions that land on 24. When the page reports no result, it means the exhaustive search covered every allowed construction and found none, which is a real classification rather than a sign that the tool gave up early. The four numbers never leave the browser, so a hand can be tested freely during classroom practice, puzzle drills, or competitive play without any account or upload.

24 game solutions
24 game solutions

The rule set a 24 Game solution must follow

The standard 24 Game puzzle, as documented by the University of California, Santa Cruz mathematics program, asks the player to take four numbers and combine them with addition, subtraction, multiplication, division, and parentheses so that the expression equals 24 exactly. Each of the four numbers must be used once and only once. Nothing else is added: no concatenation of digits, no exponentiation, no factorials, no roots, no unary minus counted as a separate operation, and no reuse of a number.

The 24 Game Solver follows that contract without exception. The page accepts four integers between 1 and 99, applies only the four basic operations, and demands that every intermediate value also be formed legally from those operations. The rules are narrower than some classroom variants allow, and that is intentional. The narrower rule set is what makes "no solution" a meaningful verdict: if the search reports nothing, then under the documented rules no construction can reach 24.

Commercial editions sometimes relax the number range or tighten it; some card decks draw from 1 through 10, others from 1 through 13. The solver here deliberately accepts a wider range up to 99 to cover textbook and online puzzle variants, while still keeping the standard operation contract.

Rule elementStandard 24 Game (per UC Santa Cruz)24 Game Solver acceptsOutside this solver
Numbers per hand44Other counts
Use of each numberExactly onceExactly onceReuse or skip
Allowed operations+, −, ×, ÷+, −, ×, ÷Powers, factorials, roots
ParenthesesAllowedAllowed
Digit concatenationNot allowedNot allowedConcatenated numbers
Unary negation as separate opNot allowedNot allowedTreating −x as a free move
Number rangeVaries by edition1–990, negatives, decimals

How to enter a hand and read the result list

  1. Open the 24 Game Solver in your browser.
  2. Enter exactly four whole numbers, one per field. Each number must be between 1 and 99. No blanks, no zero, no negatives, no decimals.
  3. Select Solve. The solver exhaustively searches every allowed grouping and operation, then returns the result list.
  4. Read each returned expression from the innermost parentheses outward. Every expression ends with "= 24", so a candidate can be checked directly instead of being treated as an opaque success message.
  5. If the page reports no solution, treat that as the verdict for the displayed rules: the exhaustive search found no valid expression that equals 24.

For classroom or puzzle practice, try a hand before selecting Solve and then compare your construction with the returned list. Parentheses are significant: they disclose the order of operations and should not be removed casually. A puzzle that allows powers, factorials, or repeated numbers is a different problem and may have answers this deliberately constrained solver will not show.

Why fraction math is the difference between correct and missed

Several well-known 24 Game hands only work because of a fractional intermediate value. The hand 3, 3, 8, 8 is the classic example: a known standard solution uses the temporary value 8/3 as an intermediate before the outer subtraction and division close, so any solver that tests only left-to-right integer combinations will report 3, 3, 8, 8 as impossible even though it is solvable in the standard rules.

The 24 Game Solver avoids that failure mode by storing every intermediate result as a reduced fraction: an integer numerator paired with a positive integer denominator, both kept within JavaScript safe-integer limits. At each step the solver reduces the fraction by the greatest common divisor of numerator and denominator, then checks the final value as numerator = 24 × denominator. Two consequences follow. First, a value that is merely close to 24 — for example 23.9999999 — is never presented as exact, because the equality test is exact. Second, a valid construction that depends on a repeating decimal intermediate is not lost to rounding noise, because the fraction is kept symbolic until the final comparison.

How the search explores every pairing and grouping

The recursive procedure begins with the four entered numbers in a pool. It selects every unordered pair from that pool, combines the two chosen numbers with addition and multiplication, with both orders of subtraction, and with both orders of nonzero division, and returns each result to the remaining pool along with the unchosen numbers. The same process repeats with three numbers, then two. When only one term remains, that term is checked against 24.

Pairings and parenthesis structures are explored together, which is why hands whose solutions require nesting — such as 3, 3, 8, 8 — are found. Expressions are stored as strings with parentheses preserved, and the final list is deduplicated, sorted by length then locale order, and capped at 50 results to keep the page readable. The cap does not change solvability; it simply prevents a hand with many equivalent forms from filling the screen with rearrangements.

Verification hands that prove the rules work

A few hands act as anchor tests for the solver, and they are independently cross-checked against the 4nums 24 Game solver under the same rule set:

  • 1, 2, 3, 4 — must solve. A straightforward construction that multiplies all four numbers verifies the basic multiplication path.
  • 3, 3, 8, 8 — must solve. A standard solution requires a fractional intermediate, which exercises the fraction-handling path.
  • 1, 5, 5, 5 — must solve. Its fractional intermediate exercises the fraction path again, in a different shape.
  • 1, 5, 11, 13 — must remain unsolved. Under the standard four-operation rules, this hand has no valid expression that equals 24.

When both classifications agree, the hand's verdict under the standard 24 Game rules is locked.

When "no solution" is the real answer

A no-solution result is not a failure to search. The solver runs an exhaustive enumeration of every allowed operation and grouping for the four entered numbers, so a verdict of "no solution" means that under the displayed rules the hand simply cannot reach 24. For comparison, 1, 5, 11, 13 is a known impossible hand in the standard 24 Game rule set, while 1, 5, 5, 5 is solvable.

Two practical checks before accepting that verdict:

  • Confirm the four numbers were copied correctly into the input fields. A single-digit typo can change the verdict.
  • Confirm the source puzzle uses the same operation rules. A variant that allows powers, factorials, repeated numbers, or concatenation is a different problem, and the solver will deliberately return no result for those because they fall outside the documented contract.

Practical limits the solver enforces

The page caps inputs at 99 and requires positive integers, so intermediate products never approach JavaScript unsafe-integer territory. The result list is capped at 50 expressions, so a hand with many equivalent forms still returns a readable page. No login is required, no usage limit is imposed, and the four numbers stay in the browser; no upload, no storage, no account attachment.

The solver does not generate random puzzles, does not rank difficulty, does not teach a guaranteed shortest construction, and does not verify expressions a player has already typed. It answers one focused question for the four numbers a player supplies: under the standard rule set, can these four numbers reach 24, and which expressions demonstrate the answer.