Numbers that start higher
Children’s puzzles often use a run such as 4 to 12. Each step the first number moves up from 1 adds the size once to every line: 4 to 12 is three steps up from 1 to 9, so its magic sum is 15 + 3 × 3 = 24.
A Magic Square puzzle is a square of numbers, each used once, where every row, every column and both long diagonals add up to the same magic sum: 15 for 1 to 9 in a 3×3 square, 34 for 1 to 16 in a 4×4. You start with a line that has one empty square, whose number is the magic sum minus the rest of the line, then list the pairs and sets of free numbers that make up what the longer lines still need.
Making a puzzle book? Magic Square book generator
By Wisdom Effect · Updated
A Magic Square puzzle is one of the oldest number puzzles there is. You get a square with a few numbers printed and one rule: every row, every column and both long diagonals must add up to the same total. Each number of the square is used once, so a number that fits one line still has to fit the two or three other lines that cross it. That is what makes a small square of sums a real logic puzzle.
1 to 9 · magic sum 15
The puzzle is a square of 3×3 to 6×6 boxes. Each box takes one number, and each number is used exactly once: 1 to 9 in a 3×3 square, 1 to 16 in a 4×4.
Each row, each column and the two long diagonals, from corner to corner, add up to the same total, called the magic sum.
When the page does not print it, add up all the numbers of the square and divide by the number of rows: 45 ÷ 3 = 15 for 1 to 9.
Easier puzzles print more numbers to start with, harder ones fewer. The rest follows from the sums.
A good puzzle can be completed in only one way, and logic gets there without a guess.
1 to 9 · magic sum 15
A 3×3 Easy puzzle from our generator: the numbers 1 to 9, magic sum 15, three of them printed. The steps under the square solve it with the last number of a line, one square at a time. Try it yourself first, then compare with the steps.
1 to 9 · magic sum 15
Tap a square, then a number from 1 to 9. Each number goes in once.
Step 1
1 to 9 · magic sum 15
Row 1 has 3 and 8 printed, 11 together. Its empty square, row 1, column 1, is 15 − 11 = 4.
Step 2
1 to 9 · magic sum 15
Column 3 now has 8 at the top and 6 at the bottom, which make 14. The square between them is 15 − 14 = 1.
Step 3
1 to 9 · magic sum 15
It runs from the 4 to the 6, which make 10, so the middle square is 15 − 10 = 5.
Step 4
1 to 9 · magic sum 15
Row 2 holds 5 and 1: 6 so far. Row 2, column 1 is 15 − 6 = 9.
Step 5
1 to 9 · magic sum 15
Column 1 has 4 and 9, which make 13, so the bottom left corner is 15 − 13 = 2.
Step 6
1 to 9 · magic sum 15
Row 3 has 2 and 6: row 3, column 2 is 15 − 8 = 7. Column 2 checks out, 3 + 5 + 7, and so does the diagonal from the top right, 8 + 5 + 2. Every number from 1 to 9 is used once. Solved.
Every line makes the same total, and you can know it before you write a single number: add up all the numbers of the square and divide by the number of rows, since the rows hold every number once between them.
| Square | Numbers | All of them | Magic sum |
|---|---|---|---|
| 3×3 | 1 to 9 | 45 | 15 = 45 ÷ 3 |
| 4×4 | 1 to 16 | 136 | 34 = 136 ÷ 4 |
| 5×5 | 1 to 25 | 325 | 65 = 325 ÷ 5 |
| 6×6 | 1 to 36 | 666 | 111 = 666 ÷ 6 |
Children’s puzzles often use a run such as 4 to 12. Each step the first number moves up from 1 adds the size once to every line: 4 to 12 is three steps up from 1 to 9, so its magic sum is 15 + 3 × 3 = 24.
In a 3×3 square, the two boxes on either side of the middle, in a row, a column or a diagonal, always make two thirds of the magic sum: 10 when the numbers are 1 to 9.
The numbers 1 to 9 make just eight magic squares, each a turn or a mirror image of the others. In all of them the corners hold 2, 4, 6 and 8, so the 1 is never in a corner.
Every Magic Square, small or large, is solved in the same loop. Go down this list, and start again from the top of it each time you write a number.
Know the magic sum: read it from the page, or add up all the numbers and divide by the number of rows.
Look at every row, every column and both diagonals for a line with a single empty square, and fill it.
On a 3×3 square, write a third of the magic sum in the middle. On a 4×4 square, add up the corners and the four middle squares.
Keep a list of the free numbers. For each line with two empty squares, write the pairs that make up its rest.
Where two lines meet in a square, keep the numbers both allow. Check every free number: if only one square can take it, write it there.
Still stuck: work out sets of three, then four numbers, starting with the lines that need the least or the most. After each number, go back to the second step.
From the last number of a line to four numbers at once, in the order you need them. Each one is shown on a real puzzle from our Magic Square generator, at the moment the move applies.
Easy puzzles need nothing more than this: find a line with one empty square, fill it and look again. Every harder puzzle comes back to it after each of its other moves. Check all the lines each time, the two diagonals included.
1 to 16 · magic sum 34
A row or a column with one empty square gives its number away: the magic sum minus the numbers already in that line.
This 4×4 square takes 1 to 16, so every line makes 34. Row 2 holds 5, 9 and 4, which add up to 18, so its empty square, row 2, column 3, is 34 − 18 = 16. Columns work the same way: column 1 holds 14, 5 and 12 and is one number short as well.
1 to 16 · magic sum 34
The two long diagonals, from corner to corner, are lines like the rest. A diagonal with one empty square takes the magic sum minus its other numbers.
On the same square the diagonal from the top left holds 14, 9 and 1, which make 24, so its last square, row 4, column 4, is 34 − 24 = 10. Nothing on the page marks the diagonals, which is why they get forgotten. Only the two that run from corner to corner count; a shorter slant adds up to nothing in particular.
Two facts come from the whole square rather than from one line, and they hold in every magic square of their size. Our generator does not rely on them for any level, but on a 3×3 or a 4×4 square they often give a number long before any pair would.
1 to 9 · magic sum 15
In every 3×3 magic square the middle square holds a third of the magic sum: 5 when the numbers are 1 to 9.
The middle row, the middle column and both diagonals all pass through the middle. Together they make four magic sums, 60, and hold every number of the square once plus the middle three more times. All nine numbers add up to 45, so three middles make 15 and the middle is 5. Here row 1 is full with 6, 1 and 8 and no other line has a single empty square, yet the middle can be written at once.
1 to 16 · magic sum 34
In every 4×4 magic square the four corners add up to the magic sum, and so do the four squares in the middle. Three of them known give the fourth.
The two diagonals hold exactly the corners and the middle four, so those eight squares make 2 × 34 = 68. Rows 1 and 4 with columns 1 and 4 make 136, the total of all sixteen numbers, yet they count the corners twice and leave out the middle four: so the corners and the middle four make the same, 34 each. Here the corners hold 3, 14 and 12, which make 29, so row 4, column 1 is 34 − 29 = 5, while its row, its column and its diagonal each still have two empty squares.
Medium puzzles stop with no line one number short. Now keep a list of the free numbers, the ones not in the square yet: a line with two empty squares can only take two of them that make up its rest. These three moves, with the last number, solve every Medium puzzle.
1 to 16 · magic sum 34
A line with two empty squares needs two free numbers that make up what it is missing. Write the numbers of those pairs small in both squares; every other number is out of them.
Row 2 holds 11 and 2, so its two empty squares need 34 − 13 = 21. The free numbers are 3, 5, 6, 8, 9, 10, 13, 14, 15 and 16, and 21 is 5 + 16, 6 + 15 or 8 + 13. 9 + 12 and 7 + 14 would need a number that is printed elsewhere, and 10 + 11 the 11 of the row itself. So 3, 9, 10 and 14 are crossed out of row 2, columns 1 and 2.
1 to 9 · magic sum 15
Every square sits on a row and a column, and some on a diagonal too. When the pairs of two of its lines have only one number in common, that number goes in the square.
With the 7 and the 1 found, row 2 and column 2 are full and four numbers are free: 2, 4, 6 and 8. Row 1 has the 9 and needs 6 more from its corners: only 2 + 4. Column 1 has the 3 and needs 12 from its top and bottom squares: only 4 + 8. The top left corner is on both lines, and 4 is the only number in both pairs. The diagonal through it still allows 2, 4, 6 or 8, so it adds nothing here.
1 to 16 · magic sum 34
Every number goes in once. When the pairs of the other squares keep a free number out of all of them but one, it goes in that last square.
Nine numbers are free: 1 and 9 to 16. Every line with two empty squares needs 21 or more, and beside a 1 the other square would need 20 or more, more than 16. So the 1 fits no square on such a line. Row 3, column 1 is the only empty square on none of them, as its row and its column have three empty squares each: the 1 goes there.
Hard puzzles need a line with three empty squares worked out as a set; Expert ones go to four. List the sets of free numbers that make the rest: a number in no set is out. Lines that need very little or very much give the most away.
1 to 16 · magic sum 34
A line with three empty squares needs three different free numbers that make up its rest. List those sets and cross out of its squares every number that is in none of them.
Row 2 has only the 15 printed, so its three empty squares need 19. The free numbers are 3, 6, 7, 8, 10, 11, 12, 13 and 14, and three different ones make 19 one way only: 3 + 6 + 10. The diagonal from the top right needs 24 from row 2, column 3 and row 4, column 1: 10 + 14 or 11 + 13. Row 2, column 3 is on both lines, and the 10 is the only number of row 2’s set among them, so that square is 10.
1 to 16 · magic sum 34
A line with four empty squares needs four different free numbers. Most totals split many ways, so use what its squares can still take: a set that needs a number a square has lost is out.
Column 1 is empty and needs 34. After the pairs and sets of three of the other lines, its squares can still take 11 or 12 at the top, 6, 7 or 8 in rows 2 and 3, and 9 or 12 at the bottom. With 12 at the bottom the top would be 11, and rows 2 and 3 would need 34 − 23 = 11, less than 6 + 7. So the bottom square is 9, and only 6 + 7 + 9 + 12 and 6 + 8 + 9 + 11 are left.
6 squares from our generator, each a step harder than the one before. Each is solved with the moves of this guide; the hint button names the line or the square where the next move is. For a number above 9, type its two keys quickly, or tap it below the square.
4×4 Easy: the numbers 1 to 16 and the magic sum 34, eight of them printed. The last number of a line solves it from start to finish.
1 to 16 · magic sum 34
Tap a square, then a number from 1 to 16. Each number goes in once.
3×3 Medium with the numbers 4 to 12 instead of 1 to 9, so every line makes 24. Two numbers are printed. After the first number, the middle of a 3×3 square makes it an Easy one.
4 to 12 · magic sum 24
Tap a square, then a number from 4 to 12. Each number goes in once.
4×4 Medium with five numbers printed. Three times no line is one number short: find the square where two lines meet.
1 to 16 · magic sum 34
Tap a square, then a number from 1 to 16. Each number goes in once.
5×5 Hard, the size of our Hard books: the numbers 1 to 25, magic sum 65, nine of them printed. Somewhere it needs a set of three numbers.
1 to 25 · magic sum 65
Tap a square, then a number from 1 to 25. Each number goes in once.
4×4 Expert with five numbers printed and the top row empty. It needs a set of four numbers at least once.
1 to 16 · magic sum 34
Tap a square, then a number from 1 to 16. Each number goes in once.
6×6 Expert, the size of our Expert books and the hardest here: the numbers 1 to 36, magic sum 111, 17 of them printed.
1 to 36 · magic sum 111
Tap a square, then a number from 1 to 36. Each number goes in once.
Want more? Make a fresh page with the Free Magic Square Puzzle Generator and print it, with its answers.
Each number goes in once in the whole square, not once per line. A 7 in row 1 and another 7 in row 3 is one 7 too many, even if both rows add up.
A square can have every row and column right and still be wrong. Add up both long diagonals before you call it solved.
A square of 4 to 12 does not make 15. Work the sum out from the numbers the puzzle uses, not from the size alone.
A pair can add up and still be impossible because one of its numbers is written somewhere else. Cross numbers off your list as you place them.
A guess can fit two lines and break a third much later. Every square on this page is solved with the moves of this guide, without a guess.
Fewer printed numbers make a square harder, but what sets the level is the logic it needs. This is how our book generator makes its four levels, and the square each one uses by default.
| Level | Square | Printed numbers | Moves it needs |
|---|---|---|---|
| Easy | 4×4 | 8 of 16 | The last number of a row, a column or a diagonal. |
| Medium | 4×4 | 5 to 7 of 16 | The last number, then pairs, where two lines meet and the only place. |
| Hard | 5×5 | 9 to 11 of 25 | All of those, then sets of three numbers. |
| Expert | 6×6 | 15 to 19 of 36 | All of those, then sets of four numbers. |
The printed numbers are the fewest and the most in 15 puzzles of each preset. Every level also comes smaller: a 3×3 Easy square prints 3 numbers, Medium 2 or 3 and Hard 2, and Expert starts at 4×4 with 4 or 5. Kids books keep to Easy and Medium on 3×3 and 4×4 squares, with a run of numbers of their own by default; senior books go up to Hard on squares up to 5×5. Our generator checks each puzzle without the shortcuts of the whole square, and they often find a number sooner, so a 3×3 or 4×4 square can feel a level easier once you use them.
Fill the empty boxes so that each number of the square is used once and every row, every column and both long diagonals add up to the same total. In a 3×3 square of 1 to 9 that total is 15; in a 4×4 square of 1 to 16 it is 34.
Add up all the numbers the square uses and divide by the number of rows. 1 to 9 make 45, and 45 ÷ 3 = 15. For 1 to 16 it is 136 ÷ 4 = 34, for 1 to 25 it is 325 ÷ 5 = 65 and for 1 to 36 it is 666 ÷ 6 = 111.
Always a third of the magic sum: 5 when the numbers are 1 to 9, 8 when they are 4 to 12. The four lines through the middle add up to four magic sums and hold the middle four times, which is what fixes it.
Work out the magic sum, then look for a row, a column or a diagonal with one empty square: its number is the sum minus the others. On a 3×3 square the middle comes free, and on a 4×4 square the corners add up to the magic sum. After that, list the pairs for the lines with two empty squares.
The Lo Shu square is the oldest known magic square: the 3×3 square of 1 to 9 where every line adds up to 15. Larger squares work the same way, with longer lines and larger sums. Schools and puzzle books also call them number squares or magic sum squares; the rule is always the same.
Yes, the two long ones from corner to corner. A square whose rows and columns add up but whose diagonals do not is only a semi-magic square. Shorter diagonals do not count.
With the numbers 1 to 9, eight, and they are all the same square turned or mirrored. That is why a 3×3 puzzle of 1 to 9 is quick to learn, and why our children’s books use runs of other numbers by default, such as 4 to 12, to keep every page new.
No. A good puzzle has one solution that logic reaches. Every square on this page is solved with the moves of this guide, and our generator checks each puzzle with the same kind of moves before it goes into a book.
Size and fewer printed numbers. A 3×3 or 4×4 square soon has lines one number short; in a 5×5 or 6×6 square the lines are longer, so a line with three or four empty squares has to be worked out as a set. Our Expert books use 6×6 squares of 1 to 36.
A puzzle page and its answer key page, as they come out of a Magic Squares book.


Print-ready Magic Square books for Amazon KDP, Easy to Expert on 3×3 to 6×6 squares, one solution per puzzle and the answer key. Magic Square books are in every plan, Starter included, and in the free trial.
Magic Square book generatorJust one page? Free Magic Square Puzzle Generator