Magic Square
Fill the grid with 1 to n² so that every row, column and diagonal adds up to the same magic number. Free · no download · works on phone & desktop
Every row, column and diagonal must add up to 15
Start with a line that has only one empty cell — the missing number is the magic total minus the others.
About Magic Square
A magic square is a grid filled with the numbers 1, 2, 3 and so on, each used once, so that every row, every column and both diagonals add up to the same total — the magic number. In a 3 × 3 square it is 15, in a 4 × 4 square 34, and in a 5 × 5 square 65. Each puzzle here starts from a real magic square with some numbers removed; your job is to put the missing numbers back. The totals of every line are shown live beside the grid and turn green when a full line adds up, or red when it cannot. Any correct arrangement wins, even if it is not the one we started from. Choose the size and how many numbers are hidden — easy 3 × 3 puzzles take a minute, a hard 5 × 5 is a real brain workout.
How to play
- Tap an empty cell, then tap a number in the tray below (or type it).
- Each number from 1 to n² is used exactly once. Placing a number that is already on the grid moves it to the new cell.
- The sums beside each row, below each column and at the corners for the diagonals update as you play.
- A full line turns green when it adds up to the magic number and red when it does not.
- Solve it when every row, column and diagonal is green. Use ⌫ or Backspace to clear a cell.
Tips & strategy
- Look for a line with only one empty cell: the missing number is the magic total minus the rest.
- In a 3 × 3 square the middle is always 5, and the corners are always even.
- Large numbers rarely sit in the same line — spread them out.
- On bigger squares, fill the diagonals early; they cross many lines.
Frequently asked questions
What is a magic square?
A magic square is a square grid of the numbers 1 to n² in which every row, column and both main diagonals add up to the same number, called the magic constant.
What is the magic number of a 3 × 3 square?
It is 15. In general the magic constant is n × (n² + 1) ÷ 2, which gives 34 for a 4 × 4 square and 65 for a 5 × 5 square.
Is there only one correct answer?
Not always. If the numbers already given allow more than one magic arrangement, any of them is accepted as a win.
How are the puzzles made?
Each puzzle starts from a real magic square built with classic methods — such as the Siamese method or the square in Albrecht Dürer’s 1514 engraving — then turned, flipped or inverted before some numbers are hidden.
How do I type numbers above 9?
Type both digits quickly, for example 1 then 2 for 12. A single digit is placed after a short pause.