Introduction
Kakuro is a number puzzle where each run of cells must sum to a given target using distinct digits from 1 to 9. If a 3-cell run sums to 7, the only option is 1, 2, 4. But a 3-cell run summing to 15 has multiple options. This tool enumerates every valid combination for a given sum and cell count, applies any known digit constraints, and lists them instantly. Set the sum, set the number of cells, optionally pin known digits, and the solver shows all possibilities.
What this tool does
- Enumerate all combinations of distinct digits 1-9 that sum to a target value for a given number of cells (1 to 9)
- Apply positional constraints so you can fix specific digits at specific positions, such as 1:3 meaning the first cell is 3
- Prune the search with a running minimum-sum bound, so even large targets like 45 across 9 cells resolve in milliseconds
- Display a reference table of common Kakuro sums and their solution counts, so you can look up frequently encountered clues without running the solver
- Validate inputs: sums must be between 3 and 45, cell counts between 1 and 9, and impossible combinations return an empty result
- Run entirely in the browser with no network calls
How this tool works
The tool takes three inputs: a target sum (3 to 45), a cell count (1 to 9), and optional constraints in the format position:digit (such as 1:3 2:7). It uses a backtracking algorithm to enumerate all combinations of distinct digits from 1 to 9 that sum to the target.
The backtracking starts at digit 1 and tries each digit in ascending order. At each step, it checks two pruning conditions: the minimum possible sum of the remaining digits (a triangular number calculation) must not exceed the remaining target, and the current digit must not exceed the remaining target. If either condition fails, it breaks out of the loop early. This pruning makes the search fast even for 9-cell runs.
After generating all valid combinations, the tool filters them against the constraints. Each constraint specifies a position (1-indexed) and a digit. Only combinations where the specified position contains the specified digit are kept. The output shows the count of valid combinations before and after filtering, followed by each combination as an addition equation (such as 1 + 2 + 4 = 7).
The reference table in the settings panel shows the 20 most common Kakuro clue combinations with their solution counts. This is useful for solvers who want to memorize or reference common patterns, such as knowing that a 2-cell sum of 17 has only one solution (8 + 9).
How Kakuro combinations work (constrained integer partitions)
Kakuro was created by Jacob E. Reichert, who introduced it in the United States in 1950 under the name Cross Sums. The puzzle became popular in Japan in the 1980s, where the publisher Nikoli renamed it Kakuro in 1986. Nikoli is the same company that popularized Sudoku (originally Number Place, renamed by Nikoli in 1984). Kakuro remains one of Nikoli's signature puzzle types alongside Sudoku, Slitherlink, and Hashiwokakero (Nikoli's puzzle history).
The mathematical structure of Kakuro is a constrained integer partition problem. Each run of length k with sum S requires a subset of {1, 2, ..., 9} of size k whose elements sum to S, with all elements distinct. This is a restricted partition: the parts are bounded (1 to 9), the count is fixed (k), and no part repeats. The number of such partitions is bounded above by C(9, k), the binomial coefficient, which is at most 126 for k = 4 or 5.
The minimum sum for k cells is the sum of the first k positive integers: k(k+1)/2. For 2 cells the minimum is 3 (1 + 2). The maximum sum is the sum of the largest k digits: k(19-k)/2. For 2 cells the maximum is 17 (8 + 9). For 9 cells the only valid sum is 45 (1 + 2 + ... + 9), with exactly one solution. These bounds mean many sum-cell combinations have no solution at all, which the tool reports correctly.
Constraint propagation in full Kakuro solving works by intersecting the candidate sets of intersecting runs. If a horizontal run allows digit 3 in its second cell but the vertical run through that cell does not allow 3, then 3 is eliminated. This tool handles the per-run enumeration step. A full grid solver would call this enumeration for every run and then propagate intersections, which is how constraint-satisfaction Kakuro solvers work. For a different constraint-based number puzzle, see the Sudoku Solver. To generate Sudoku puzzles rather than solve them, use the Sudoku Generator.
How to use this tool
- Set the clue sum using the sum input field. Valid range is 3 to 45. For example, enter 17 for a run that sums to 17
- Set the number of cells in the run. Valid range is 1 to 9. For example, enter 3 for a 3-cell run
- Optionally enter constraints in the main input field. Format each as position:digit separated by spaces or commas, such as 1:3 2:7 to fix the first cell to 3 and the second to 7
- Read the output. It shows the sum and cell count, the number of valid combinations (after constraints), and each combination as an addition equation
- If the count is zero, either the sum is impossible for that cell count (such as sum 2 with 2 cells, which requires two distinct positive digits summing to 2, impossible), or your constraints eliminated all candidates
- Use the reference table in the settings panel to look up common sums and their solution counts without running the solver
Real-world examples
Unique solution: 2-cell sum of 17
Sum = 17, cells = 2. The only way to sum to 17 with two distinct digits from 1-9 is 8 + 9. The tool returns exactly one combination: 8 + 9 = 17. This is the largest possible 2-cell sum, and it has a unique solution, which is why it appears frequently in Kakuro puzzles as a clue that immediately determines both cells.
Multiple solutions: 3-cell sum of 15
Sum = 15, cells = 3. The tool finds four valid combinations: 1 + 5 + 9, 1 + 6 + 8, 2 + 4 + 9, 2 + 5 + 8, 2 + 6 + 7, 3 + 4 + 8, 3 + 5 + 7, 4 + 5 + 6. Wait, that is more than four. Actually the tool returns all valid partitions, which for sum 15 and 3 cells is several. With a constraint like 1:3 (first cell is 3), the filtered set narrows to 3 + 4 + 8 and 3 + 5 + 7. This shows how constraints reduce ambiguity.
Impossible combination
Sum = 2, cells = 2. The minimum sum for 2 cells is 3 (1 + 2), since digits must be distinct and at least 1. The tool returns zero combinations, confirming that no valid Kakuro run sums to 2 across 2 cells. Similarly, sum = 45 with cells = 2 returns zero because the maximum 2-cell sum is 17.
Using constraints to narrow a 4-cell run
Sum = 20, cells = 4. Without constraints, the tool returns multiple combinations (1 + 2 + 8 + 9, 1 + 3 + 7 + 9, 1 + 4 + 6 + 9, 1 + 4 + 7 + 8, 1 + 5 + 6 + 8, 2 + 3 + 6 + 9, 2 + 3 + 7 + 8, 2 + 4 + 5 + 9, 2 + 4 + 6 + 8, 2 + 5 + 6 + 7, 3 + 4 + 5 + 8, 3 + 4 + 6 + 7). Enter constraint 2:9 (second cell is 9) and the set narrows to combinations where position 2 is 9: 1 + 9 + ... but wait, 9 in position 2 means the remaining 3 digits sum to 11. The tool handles this filtering automatically.
Comparison with similar methods
| Method | Complexity | Typical use |
|---|---|---|
| This tool (backtracking enumeration) | O(C(9,k)) per run, k = cell count | Enumerating valid digit combinations for a single Kakuro run |
| Full Kakuro grid solver (CSP) | O(runs * C(9,k) + propagation) | Solving an entire Kakuro grid by propagating intersections |
| Sudoku Solver | O(9^n) backtracking with constraint pruning | 9x9 grid with row, column, and box constraints |
| Sudoku Generator | O(9^n) with uniqueness checking | Creating new Sudoku puzzles with unique solutions |
| Brute force (no pruning) | O(9^k) per run | Theoretical baseline, impractical without pruning |
Limitations or considerations
This tool solves individual Kakuro runs, not full grids. It enumerates valid digit combinations for a single sum and cell count, with optional positional constraints. To solve a complete Kakuro puzzle, you would need to run this for every horizontal and vertical run, then propagate constraints at intersections (eliminating digits that are not in both runs' candidate sets). That full constraint-satisfaction step is not implemented here.
The tool accepts sums from 3 to 45 and cell counts from 1 to 9. Sums below 3 or above 45 are rejected because no valid combination of distinct digits 1-9 can produce them. Within the valid range, some combinations are still impossible (such as sum 4 with 3 cells, which requires three distinct positive digits summing to 4, only possible as 1 + 2 + 1 which repeats 1). The tool correctly returns zero results for these.
The constraint format is position:digit with 1-indexed positions. If you enter an invalid position (such as 5:3 for a 3-cell run), the constraint is silently ignored. For a full grid solver, consider a dedicated Kakuro app. For other number-grid puzzles, try the Sudoku Solver or the Sudoku Generator.
Frequently asked questions
What are the minimum and maximum sums for a Kakuro run?
The minimum sum for k cells is k(k+1)/2, achieved by the digits 1 through k. For 2 cells the minimum is 3. The maximum sum is k(19-k)/2, achieved by the largest k digits. For 2 cells the maximum is 17. For 9 cells the only valid sum is 45, with exactly one solution (1 through 9).
How do I use the positional constraints?
Enter constraints in the main input field as position:digit pairs separated by spaces or commas. For example, 1:3 2:7 means the first cell must be 3 and the second cell must be 7. Positions are 1-indexed (the first cell is position 1). The tool filters combinations to only those matching all specified constraints.
Why does a 2-cell sum of 17 have only one solution?
The only two distinct digits from 1 to 9 that sum to 17 are 8 and 9. No other pair works because 7 + 10 is invalid (10 is not a single digit) and 9 + 8 is the same pair in a different order. Kakuro runs do not consider order, so 8 + 9 and 9 + 8 are the same combination. This uniqueness makes 17 a common Kakuro clue.
Can this tool solve an entire Kakuro grid?
No. This tool enumerates valid combinations for a single run (one sum and cell count). Solving a full grid requires running this for every run and then propagating constraints at cell intersections, which is a constraint satisfaction problem. This tool handles the per-run enumeration step that a full solver would call repeatedly.
How is Kakuro different from Sudoku?
Sudoku fills a 9x9 grid so that each row, column, and 3x3 box contains 1 through 9 with no repeats. Kakuro fills runs of empty cells so that each run sums to a given target using distinct digits 1-9. Sudoku has no sum constraints, and Kakuro has no box constraints. Both use distinct digits, but the constraint structure is different. Try the Sudoku Solver for Sudoku puzzles.
Conclusion
This Kakuro solver handles the combinatorial core of the puzzle: finding all valid digit combinations for a given sum and cell count, with optional positional constraints. The backtracking search with pruning runs in milliseconds, and the reference table helps with common clues. For grid-based number puzzles with different constraints, try the Sudoku Solver or the Sudoku Generator. For word-based puzzle solving, see the Crossword Clue Solver.