A 24 number game solver determines whether exactly four whole numbers can make exactly 24 by using each number once with addition, subtraction, multiplication, division, and parentheses.

The 24 Game Solver searches every allowed arithmetic grouping and displays up to 50 distinct expressions that equal 24, allowing you to check a puzzle hand, verify a proposed construction, or establish that no solution exists under the stated rules.

24 number game solver
24 Number Game Solver: Check a Hand and Read Results

Rules for a valid 24 hand

The solver accepts exactly four positive whole numbers, from 1 through 99, with one number in each input field. Every accepted expression must use all four supplied values exactly once. A value cannot be omitted, repeated, or joined to another value as a multi-digit number.

Only the four basic arithmetic operations are available: addition, subtraction, multiplication, and division. Parentheses can establish the order in which those operations are performed. The solver does not add powers, factorials, roots, decimal points, or unary negation as an extra operation.

This operation set follows the standard 24 Game format documented by the UC Santa Cruz mathematics program and independently cross-checked against the 4nums 24 Game reference. Unlike editions based on a smaller deck of cards, this tool accepts any four values within its full 1–99 input range.

RuleWhat the solver checks
Number of inputsExactly four values
Accepted inputWhole numbers from 1 through 99
TargetAn exact value of 24
Allowed operationsAddition, subtraction, multiplication, and division
Allowed groupingParentheses that determine operation order
Number usageEach entered value appears exactly once
Excluded techniquesConcatenation, exponentiation, factorials, roots, decimal insertion, and extra unary negation

Although negative inputs are not accepted, subtraction can produce a negative intermediate value. That result may still participate in a valid expression if it follows one of the permitted operations.

Solve a four-number hand

  1. Enter the four numbers. Put one whole number from 1 through 99 in each field. Confirm that every digit was copied correctly, especially when the source puzzle contains repeated values.
  2. Select Solve. The solver begins an exhaustive search of the allowed operations and arithmetic groupings using exact fractions.
  3. Review the returned expressions. Each result is displayed as a complete expression followed by = 24, so the equality can be checked directly rather than accepted as an unexplained success message.
  4. Read from the inside outward. Evaluate the innermost parentheses first, then combine their result with the next term. Continue until the expression reaches its final value.
  5. Check the no-solution message when it appears. This is the verdict for the supplied values and the solver’s basic-operation rules. Recheck the entries and confirm that the original puzzle uses the same rules before treating it as an unsolvable hand.

Parentheses are part of the construction, not optional decoration. Removing them can change which operation happens first and may turn a valid answer into an invalid one.

Why exact fractions matter

The solver explores the expression tree by repeatedly choosing two remaining terms. It combines the pair with addition and multiplication, both subtraction orders, and every legal division order. The new term returns to the pool, and the process repeats until one term remains. This covers different pairings and parenthesis structures rather than testing only left-to-right calculations.

Every intermediate result is stored as a reduced fraction with an integer numerator and a positive denominator. The greatest common divisor is removed to keep the fraction in reduced form, and the final answer is accepted only when the numerator equals 24 multiplied by the denominator. A result that is merely close to 24 therefore cannot pass as an exact solution.

For example, consider the hand 3, 3, 8, and 8:

  1. 3 − 8/3 = 9/3 − 8/3 = 1/3
  2. 8 ÷ (1/3) = 8 × 3 = 24

The complete expression is 8 ÷ (3 − 8/3) = 24. It uses both 3s and both 8s exactly once. An integer-only trial that rejects fractional intermediate values would miss this route, while exact fraction arithmetic retains it.

For more detail on division-based routes and how they are verified, see the contextual guide to solving and verifying 24 Game hands with fractions.

Interpret the returned expressions

A returned expression is a concrete construction that satisfies the tool’s rules. Before using it as an answer, check that all four original values are present once and that every operation is one of the four permitted arithmetic operations. Parentheses should remain in place because they communicate the intended calculation order.

The search is exhaustive for the disclosed operation set, but the display is capped at 50 distinct expression strings. When a hand has many valid arrangements, the result list may not show every construction. Duplicate expression strings are removed, yet reordered expressions can still express the same broad arithmetic idea. The list therefore contains valid constructions rather than one canonical answer for every mathematical equivalence class.

ResultMeaningWhat to do next
An expression ending in = 24An exact valid construction was found under the displayed rules.Read the parentheses from the inside outward and confirm that each input appears once.
No solutionThe exhaustive search found no exact construction using all four inputs and the allowed operations.Recheck the copied numbers and confirm that the source puzzle does not permit extra operations or repeated values.

Multiple returned expressions are not a difficulty score or a guarantee that one is the shortest possible solution. Their value is that each one provides a checkable construction for the same hand.

What a no-solution result means

A no-solution verdict means the exhaustive search found no way to reach exactly 24 with the four supplied values, using every value once and only addition, subtraction, multiplication, division, and parentheses. It does not mean the numbers are mathematically unusable under every possible puzzle convention.

First, confirm that four valid numbers were entered and that none was copied incorrectly. Then check whether the original source permits powers, factorials, concatenation, square roots, decimal insertion, repeated numbers, or other techniques excluded by this solver. A puzzle with those allowances is a different problem and may have an answer that the constrained search correctly does not return.

Tool limits and browser privacy

All processing occurs in the browser. The four entered numbers and generated expressions are not uploaded, stored, or attached to an account. No login is required, and the tool has no usage limit.

The solver focuses on one question: can the supplied hand make exactly 24 under the stated rules? It does not generate random puzzles, rank their difficulty, promise a uniquely shortest solution, or verify an expression typed by a player. For classroom or puzzle practice, enter a hand, select Solve, and compare your construction with the checkable expressions returned by the tool.

For a deeper look, see Angle Converter Chart: How to Read Six Angle Units.