24 Game Solver
Find exact ways to make 24 from four whole numbers using every number once and only the four basic operations.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Enter exactly four whole numbers from 1 through 99, one number in each field.
- 2.Select Solve to exhaustively search the allowed arithmetic operations with exact fractions.
- 3.Read any returned expression from inside the parentheses outward, or use the no-solution result as the verdict for these rules.
About 24 Game Solver
24 Game Solver searches for arithmetic expressions that turn four supplied whole numbers into exactly 24. Enter four values from 1 through 99 and select Solve. Every accepted expression uses each entered value exactly once and uses only addition, subtraction, multiplication, division, and parentheses. The result list shows the complete expression followed by = 24, so a proposed answer can be checked directly instead of accepted as an unexplained success message.
The search is exhaustive for the disclosed operation set. At each step, it chooses two remaining terms, combines them with addition and multiplication, both subtraction orders, and every legal division order, then returns the new term to the pool. Repeating that process explores different pairings and parenthesis structures until only one term remains. This matters because hands such as 3, 3, 8, 8 require a fractional intermediate value and cannot be solved by testing only left-to-right integer calculations.
Arithmetic uses reduced fractions rather than binary floating-point comparisons. Every intermediate result stores an integer numerator and a positive integer denominator, reduces them by their greatest common divisor, and checks the final equality as numerator = 24 × denominator. Consequently, a value merely close to 24 is never presented as exact, and a valid repeating fractional path is not lost to rounding noise. With four inputs bounded at 99, intermediate integer products remain within JavaScript safe-integer limits.
The page returns at most 50 expressions. That bound keeps the interface readable and prevents a hand with many equivalent forms from filling the tab with hundreds of rearrangements. Reordered expressions can still express the same arithmetic idea, so the list is a set of valid constructions rather than a claim to contain one canonical answer per mathematical equivalence class. If the page reports no solution, it means the exhaustive search found none under the displayed rules and input limits.
This tool follows the common 24 Game rules documented by the University of California, Santa Cruz mathematics program and independently cross-checked against 4nums: use four given numbers exactly once, combine them with the four basic operations, and allow parentheses. It does not add concatenation, exponentiation, factorials, roots, decimal-point insertion, unary negation as an extra operation, or reuse of a number. Different commercial card editions may use a narrower card range, but this solver deliberately accepts positive whole numbers through 99 while keeping the standard operation contract.
Several external hands form the verification anchors. Simple products such as 1, 2, 3, 4 must solve; 3, 3, 8, 8 and 1, 5, 5, 5 prove fractional intermediates; and 1, 5, 11, 13 must remain unsolved under the basic rules. Tests also prove input length, integer bounds, negative denominator normalization, division presence, and the result limit. An independent fraction-based checker can reproduce the solvability classification without importing the production implementation.
All processing occurs in the browser. The four numbers and generated expressions are not uploaded, stored, or attached to an account. No login is required and there is no usage limit. The solver does not generate random puzzles, rank difficulty, teach a guaranteed shortest solution, or verify expressions typed by a player. It answers one focused question: whether the supplied four-number hand can make exactly 24 under the stated rules, and which concrete expressions demonstrate the answer.
For classroom or puzzle practice, try a hand before selecting Solve, then compare your construction with the returned list. Parentheses are significant: they disclose the order of operations and should not be removed casually. If a hand has no result, check that it was copied correctly and that the source puzzle uses the same operation rules. A puzzle allowing powers, factorials, concatenation, or repeated numbers is a different problem and may have answers this deliberately constrained solver will not show.
Methodology & sources
Validate exactly four integers in [1,99]. Represent each term as a reduced safe-integer numerator and positive denominator. Recursively select every unordered pair, generate addition, multiplication, both subtraction orders, and both nonzero division orders, and return each result to the remaining pool. Accept only numerator === 24 * denominator, deduplicate expression strings, sort by length then locale order, and cap output at 50. External solvable and impossible hands exercise the same production solver.
Frequently asked questions
- Does every solution use all four numbers?
- Yes. Every expression uses each entered number exactly once. The solver does not concatenate digits, reuse a number, or omit one.
- Why does the solver use fractions?
- Some valid hands need a fractional intermediate result. Exact reduced fractions avoid both missed division solutions and false answers caused by floating-point rounding.
- What does no solution mean?
- It means the exhaustive search found no exact 24 using only addition, subtraction, multiplication, division, parentheses, and each input once. Rules that allow powers or factorials are outside this tool.
Related tools
- Online CalculatorDo quick everyday math in your browser — free, private, no signup.
- Fraction CalculatorAdd, subtract, multiply or divide fractions instantly
- Average CalculatorMean, median, mode & more from any list of numbers, instantly
- Absolute Value CalculatorInstantly find |x| — the absolute value of any number, free.
- Age CalculatorYour exact age in years, months, and days — updated live
- Angle ConverterConvert degrees, radians, gradians, turns, arcmin & arcsec
Calculators guides
View all- How to Calculate Circumference and Area of a Circle
- How to Check the Chinese Gender Predictor for a Fun Baby Guess
- How to Calculate Cat Age in Human Years Accurately
- How to Calculate Calorie Deficit for Weight Loss
- How to Calculate Business Days Between Dates in Excel
- Calculate Brinell Hardness from Load, Ball and Indent Diameter
- How to Calculate Bra Size From Two Measurements
- How to Calculate Body Fat and Muscle Mass Percentage
- How to Calculate BMR Accurately with Two Proven Formulas
- How to Calculate BMI for Kids Accurately in Minutes
- How to Calculate Online Percentage in Your Browser
- How to Calculate BAC: Widmark Formula, Drinks & Time
- How to Determine Baby Eye Color with a Free Online Calculator
- How to Calculate Average Atomic Mass in Minutes
- How to Convert Area to Acres with a Free Online Tool
- Calculate Annular Area of a Cylinder in Seconds
- Convert Angle Measure to Decimal Degree Form in Seconds
- How to Calculate Age from Birthdate in Excel (Quick Formula)
- Convert Percentage to Absolute Value in One Step
- Get Any Number of Pi Digits Instantly – Up to 10,000