Play the 4×4 Magic Square Puzzle Online for Free
A magic square is a grid of different numbers in which every row, every column and both main diagonals add up to the same total. In this 4×4 puzzle, you place the numbers 1 to 16 in the grid so that every line adds up to 34, which is called the magic constant.
Magic squares are among the oldest number puzzles in the world. The most famous 4×4 example appears in Albrecht Dürer's 1514 engraving Melencolia I, where the two middle numbers of the bottom row, 15 and 14, show the year. There are 880 different 4×4 magic squares if you do not count rotations and reflections as different.
This free version has four difficulty levels, hints, live row and column totals and a timer. It runs in your browser with no download or sign-up, on desktop, tablet and phone.
Magic Square Rules
- Use each number once. Place the numbers 1 to 16 in the 16 cells, with no repeats.
- Rows. Every row must add up to 34.
- Columns. Every column must add up to 34.
- Diagonals. Both main diagonals must add up to 34.
Some cells are pre-filled and shown in grey. They are fixed and cannot be changed. The magic constant comes from the numbers themselves: 1 to 16 add up to 136, and 136 shared among four rows is 34 each.
How to Play Here
- Pick a difficulty. The level decides how many cells are pre-filled.
- Select a cell. Click or tap an empty cell. Its row and column are highlighted.
- Enter a number. Tap a number on the number pad. Numbers you have already placed are dimmed, and the game will not let you place a number twice.
- Watch the totals. The sums of each row and column appear beside the grid, turning green at 34 and red if a full line is wrong. The Diagonals panel shows both diagonal sums in the same way.
On a keyboard, press 1 to 9 to enter those numbers, use Backspace or Delete to clear a cell, and use the arrow keys to move around. Numbers 10 to 16 are entered with the on-screen pad. The side panel shows a progress bar and three buttons: Use Hint, Check and Clear All. Hint fills a random cell with the number from the game's reference solution, and Check highlights any of your numbers that differ from that reference. The puzzle is complete when every row, column and diagonal adds up to 34. The finish screen shows your time, moves, hints used and difficulty.
Difficulty Levels
| Level | Pre-filled cells | Hints |
|---|---|---|
| Easy | 10 | 5 |
| Medium | 7 | 3 |
| Hard | 5 | 2 |
| Expert | 3 | 1 |
The pre-filled cells change every time you start a game, so the same level can feel different each time.
How to Solve a 4×4 Magic Square
Start with the fullest line
Look for a row, column or diagonal that already has three numbers. The fourth must equal 34 minus their total. Check that the result is between 1 and 16 and not already used.
Work out what two empty cells must add up to
If a line has two numbers, subtract them from 34 to get the sum of the other two. List the unused pairs that make that total. For example, if you need a pair that adds up to 19, you could use 16 and 3, 15 and 4, 14 and 5, 13 and 6, and so on.
Use the number pad to track what is left
The pad dims numbers you have already placed. Compare the numbers still available with the totals you need, and cross off pairs that cannot work.
Remember the diagonals
In a 4×4 grid, the two diagonals do not share a cell, so they are separate constraints. Do not forget them when you check your rows and columns.
Use big and small numbers together
Every line contains four numbers with an average of 8.5. A line with a very large number such as 16 needs smaller numbers to balance it, and a line with 1 needs larger ones.
Use hints sparingly
You get a few hints per game, and each one fills a random cell. Save them for when you are truly stuck, since a filled cell often unlocks several lines at once.
Magic Square FAQ
What is a magic square?
It is a square grid of different numbers in which every row, column and main diagonal adds up to the same total.
Why is the magic constant 34?
The numbers 1 to 16 add up to 136. There are four rows, so each row must add up to 136 divided by 4, which is 34.
How many 4×4 magic squares are there?
There are 880 different ones, not counting rotations and reflections, or 7,040 if you count those as separate squares.
Is this the same as Dürer's magic square?
Dürer's square is one of the 880. The one in the 1514 engraving puts the date, 1514, in the bottom row.
Can I place the same number twice?
No. The game stops you from placing a number that is already on the board.
How do the hints work?
A hint fills one random incorrect or empty cell with the number from the game's reference solution. You have 5 hints on Easy, 3 on Medium, 2 on Hard and 1 on Expert.
Is Magic Square free to play here?
Yes. There is nothing to download and no account to create.
Does it work on mobile?
Yes. Tap a cell and then a number. The grid resizes to fit your screen.
More Free Number Puzzles
If you like numbers and sums, try Sudoku, Kakuro, Calcudoku, Killer Sudoku, Binary Puzzle, Futoshiki or Lights Out. All of them play free in your browser.
Browse all Venjex games