Free magic square generator, with the answer
Pick a size and generate a magic square, then print it with its answer. Every puzzle has one completion, with no sign-up and no watermark. It runs on the same engine as our KDP Publisher Studio.
Preview
The puzzle and its completed answer, as they print.
2 pages · US Letter · free
How to make a magic square
- Pick a difficulty. Choose a grid size from a gentle 3 by 3 up to a 5 by 5. Larger grids and fewer given numbers take longer to work out.
- Generate the puzzle. Press Generate puzzle. You get a grid with some numbers filled in and the magic total printed beneath it. Every puzzle has exactly one completion.
- Print the two pages. Press Print / save PDF. You get two pages: the puzzle on page one and the completed grid on page two.
Generate it with your AI assistant
Connect Once Books to ChatGPT, Claude or Cursor, then ask in plain English and get a print-ready PDF back. How to connect.
Generate a magic square puzzle with its solution as a printable PDF.
How to solve a magic square
Fill the grid with each number from 1 to N² once so every row, column and both diagonals add up to the same total.
The method
- Find the magic total. For an N by N grid the total is N × (N² + 1) ÷ 2, printed under the grid, so a 3 by 3 is 15 and a 4 by 4 is 34.
- Start where a line is nearly full. A row, column or diagonal with only one empty square is forced: the missing number is the total minus the others.
- Use each number once. Every value from 1 to N² appears exactly once, so cross off numbers as you place them and you narrow the choices fast.
- Cross rows with columns. A square has to satisfy its row, its column and any diagonal it sits on. Where only one unused number fits all of them, lock it in.
- The one rule
- Use 1 to N² once each so every row, column and both diagonals share the same sum.
- What the answer page shows
- The fully completed square is printed at the back.
- How the grades differ
- Bigger grids and fewer given numbers mean more to deduce before the grid settles.
- Good for
- Solvers who enjoy arithmetic and a tidy, self-checking grid.
Publishing a whole book?
This tool makes one puzzle for home or the classroom. To make a magic square book you can sell on Amazon KDP, Publisher Studio generates hundreds of graded puzzles across a difficulty curve, at any KDP trim, as a print-ready interior and solutions PDF.
Questions
- What is a magic square?
- A magic square is a grid filled with each number from 1 to N² once, so that every row, every column and both main diagonals add up to the same total. That total, the magic constant, is printed under the grid.
- Is this magic square generator free?
- Yes. Pick a difficulty, generate a puzzle and print the grid plus its answer, with no sign-up and no watermark. It is free for classroom, home and personal use.
- Does every puzzle have one solution?
- Yes. Every puzzle is generated and checked by the same solver our Publisher Studio uses, so the given numbers fix exactly one completion. A puzzle is never ambiguous or unsolvable.
- Does it include the answer?
- Yes. Every puzzle prints as two pages: the puzzle on page one and the completed square on page two, so you can check your work.
- What size are the pages?
- The free tool prints at 8.25 by 11 inches, a popular large-print size. Our Publisher Studio will export the same book at any KDP trim, from 5.06 by 7.81 up to 8.27 by 11.69, as a print-ready 300 DPI interior.
Short of ideas? Browse our ready-made printables for this puzzle and print one today.
Keep going
- Magic Square printables and variations. Ready to print, in every grade and size.
- Make your own Magic Square book for Amazon KDP. Hundreds of pages, a cover, any trim.
More puzzle generators
- Number Pyramid generatorGenerate an addition pyramid puzzle and print it with its answer. Free, no sign-up.
- Calcudoku generatorGenerate a Calcudoku (Mathdoku) puzzle and print it with its answer. Free, no sign-up.
- Number Blocks generatorGenerate a Number Blocks (Suguru) puzzle and print it with its answer. Free, no sign-up.
- Straights generatorGenerate a Straights (Str8ts) puzzle and print it with its answer. Free, no sign-up.
- Hitori generatorGenerate a Hitori shading puzzle and print it with its answer. Free, no sign-up.
- Slitherlink generatorGenerate a Slitherlink loop puzzle and print it with its answer. Free, no sign-up.