KenKen and Calcudoku, Explained

After reading this you will understand how a calcudoku puzzle is built from a Latin square, why cages with arithmetic targets force a single solution, and how to pick sizes and operations that match the solver you have in mind.

What a calcudoku puzzle is

A calcudoku (also called mathdoku, and sold under the trademark KenKen) is a small grid you fill with digits so that no digit repeats in any row or column. On top of that Latin square rule, the grid is divided into outlined regions called cages. Each cage prints a target number and an arithmetic operation. The digits inside the cage must combine, using that operation, to reach the target.

Take a 4×4 grid. Every row and every column must contain 1, 2, 3 and 4 exactly once. Suppose the top-left cage covers two cells side by side and reads 7+. The two digits must add to 7, so they are 3 and 4 in some order. That single clue already rules out 1 and 2 from those cells. The puzzle is a chain of such deductions until the whole grid is forced.

The size sets the difficulty ceiling. A 3×3 uses digits 1 to 3, a 6×6 uses 1 to 6, and a 9×9 uses 1 to 9. Cages of one cell are simple givens: the target is the digit itself, with no operation.

When to use it, and when not

Reach for calcudoku when you want arithmetic practice wrapped in genuine logic. A 4×4 addition-only puzzle drills sums to 8 for a seven-year-old. A 6×6 with multiplication and division cages exercises times tables and factoring for an older student. Unlike a worksheet of bare sums, every answer must also satisfy the row and column constraint, so a wrong digit gets caught later in the grid.

Skip it if your goal is pure logic with no arithmetic. A pupil who is still shaky on subtraction will spend all their energy on the cage math and none on the deduction, which defeats the point. In that case a plain Sudoku generator gives the same fill-the-Latin-square skill without any calculation. For inequality reasoning with almost no arithmetic, try the Futoshiki generator.

How the numbers behave

Start with the grid itself. The number of valid Latin squares grows fast. For order 3 there are 12, for order 4 there are 576, and for order 5 there are 161280. A generator picks one at random, then carves cages, then checks that the cage clues point back to exactly that square and no other.

A cage's target comes straight from its cells. For an addition cage the target is the sum, for a multiplication cage the product. Subtraction and division cages always hold exactly two cells because the order would otherwise be ambiguous, and the target is taken as the larger result:

t_{-} = |a - b|, \qquad t_{\div} = \frac{\max(a,b)}{\min(a,b)}

Here a and b are the two digits in the cage, t_{-} is the subtraction target and t_{\div} is the division target. Because you take the absolute difference and the larger-over-smaller quotient, the solver may place the digits in either order and still match the clue.

The count of digit combinations that hit a target measures how much a cage narrows the search. A two-cell 5+ in a 4×4 has two ordered pairs that work (1,4 and 2,3, each reversible), while a two-cell 1- matches three pairs (1,2, 2,3, 3,4). Fewer matches means a stronger clue. That is why a hard generator prefers large multiplication cages: a product often factors in many ways, so the cage alone leaves several options and forces you to lean on the row and column rules.

Uniqueness is a property of the whole puzzle, not of any single cage. A generator can hand you a grid whose cages each have several internal options yet whose combination admits only one full solution. The footnote on the tool describes the fix when that fails: split a large cage into smaller ones and re-check.

A worked 4×4 example

The demo button builds a 4×4 easy puzzle. Work through a representative one so you can reproduce the reasoning.

Solving a 4×4 with four cages

Label columns A to D and rows 1 to 4. The cages are:

  • 7+ over A1 and B1
  • 2÷ over C1 and D1
  • 3- over A2 and A3
  • a single-cell given 2 at D4, with the rest of the grid split into small addition cages
  1. The 7+ cage needs two digits from 1 to 4 that sum to 7. Only 3 and 4 qualify, so A1 and B1 are 3 and 4 in some order.
  2. The 2÷ cage needs a quotient of 2. The pairs are 1,2 and 2,4. But row 1 already spends 3 and 4 on the left cage, so C1 and D1 must be 1 and 2. That fixes the pair as 1 and 2.
  3. Row 1 now holds all four digits: {3,4} on the left, {1,2} on the right. The exact positions come from the vertical cages.
  4. The 3- cage over A2 and A3 needs a difference of 3, so it is 1 and 4. Column A already uses one of {3,4} in A1, so A1 must be the value that leaves 1 and 4 free below it. If A1 is 3, then A2 and A3 take 1 and 4, and A4 takes 2.
  5. With A1 = 3, B1 = 4. Then C1 and D1 hold 1 and 2, and the given 2 at D4 forces the 2 in column D away from D1, so D1 = 1 and C1 = 2.

Each step removed a possibility using either a cage or the Latin square rule. No guessing was needed, which is the mark of a well-formed easy puzzle.

How cage size changes the difficulty

The single lever that reshapes a calcudoku most is cage size. Small cages with addition give away a lot: a two-cell 3+ in a 5×5 has exactly one combination, 1,2. Large cages with multiplication give away little: a three-cell 24× in a 6×6 can be 1,4,6, 2,2,6 (blocked if in one line), 2,3,4, 1,6,4 and more, so the cage alone rarely decides anything.

In a 6×6 grid a two-cell addition target of 7 matches four ordered pairs (1+6, 2+5, 3+4 and reverses), while a two-cell multiplication target of 12 matches only 2×6 and 3×4. Larger targets and larger cages generally match more digit sets, which weakens the clue and raises difficulty.

The chart below shows the combination count for a two-cell cage in a 6×6 grid across every reachable addition target. Notice the peak in the middle.

Targets near the middle (7 matches three pairs) are weaker clues than extreme targets (3 and 11 match only one pair each).

Reading and interpreting a finished puzzle

When you look at a generated puzzle, read the cages before you read the grid. Single-cell givens are free digits: place them at once. Then scan for two-cell cages whose target has only one combination, such as the minimum sum or the maximum product. Those are your entry points.

Interpret difficulty labels as descriptions of cage structure, not as a promise about your personal solving time. As the tool footnote states, easy favors small addition cages and single-cell givens, while hard uses large multiplication cages. A hard 6×6 can have fewer clues on the page yet demand far more cross-referencing between rows, columns and cage options.

When you print for a class, generate several puzzles at one size and sort them by hand into two piles: those with three or more single-cell givens, and those with none. The first pile is a gentler warm-up even at the same difficulty label.

Common mistakes

The most frequent error is treating a subtraction or division target as fixed in one direction. A 2- cage does not mean top minus bottom equals 2. It means the two digits differ by 2, in either arrangement. Solve for the pair first, then let the row and column rules decide which cell gets which digit.

A second mistake is forgetting that a cage can repeat a digit if its cells are not in the same row or column. An L-shaped three-cell cage spanning two rows and two columns may legally hold two copies of the same digit, as long as no two of them share a line. That widens the combination list and traps solvers who assume all cage digits differ.

Do not assume a cage's digits must be distinct. Distinctness comes only from the row and column rule, not from the cage boundary. A straight two-cell cage is always distinct because its cells share a line, but a bent cage may not be.

A third mistake is pencil-marking cage options without also pencil-marking row and column exclusions. The puzzle is solved by the interaction of the two constraints. Track both, and cross out a cage option the moment a row or column forbids it.

Related puzzle generators

If you like the Latin square core but want a different clue type, several tools on this site share the family. The Kakuro generator also uses sums but places them in crossword-style runs rather than cages, and digits within a run must be distinct. The Skyscrapers generator keeps the Latin square and adds visibility clues on the edges instead of arithmetic. For a purely pictorial logic puzzle with no Latin square at all, the Nonogram maker turns a drawing into row and column run clues.

Frequently asked questions

What is the difference between KenKen, calcudoku and mathdoku?

They name the same puzzle type. KenKen is a registered trademark. Calcudoku and mathdoku are the generic names used when the trademark does not apply. The rules are identical: a Latin square with arithmetic cages.

Can a calcudoku have more than one solution?

A well-made one has exactly one. The generator verifies uniqueness and, when a candidate grid allows several solutions, it splits a large cage into smaller pieces and re-checks until only one solution remains.

Do the digits in a cage have to be different?

Not necessarily. Digits repeat only when forbidden by the row and column rule. A two-cell straight cage always shares a line so its digits differ, but a bent cage across two rows and two columns can legally repeat a digit.

Which size should I give a beginner?

Start with 4×4 using addition and single-cell givens. It uses digits 1 to 4 and sums no larger than 7. Move to 5×5 with subtraction once the fill-the-square habit is solid, then to 6×6 with multiplication and division.

Why do subtraction and division cages only ever have two cells?

With three or more cells the order of the operation would be ambiguous, since subtraction and division are not associative. Restricting them to two cells and reading the target as the absolute difference or the larger-over-smaller quotient keeps the clue well defined.