Magic square solver
Enter the numbers you know and see whether the solver can complete the square.
Every line adds up to 15, using the numbers 1 to 9 once each.
Dark squares are the numbers you typed. Yellow squares were filled in by the solver.
How to play
Choose a 3 × 3 or 4 × 4 square and type the numbers you know. The solver fills in the rest, or tells you when more than one square fits or none does.
- Type only numbers you are sure of.
- A line marked with a cross cannot reach the total.
- Press Example to see a square with one answer.
Magic square solver
A magic square solver fills a three by three or four by four square from the numbers you enter. Leave unknown cells empty to solve a magic square, count its possible answers, and see which line forced each number.
How the solver finds answers
The solver tries possible numbers in the empty cells one at a time. If a choice makes a row, column, or diagonal unable to reach the required sum, it drops that choice and tries another. It then counts the completed squares that fit your entries.
Solve a three by three square by hand
For a standard three by three magic square using consecutive whole numbers, the center is 5. Even numbers go in the corners, and opposite cells add up to 10. Use those relationships to narrow down where each number can go, then check every row, column, and diagonal.
Check a square from a book or class
Enter every number from the square, then let the solver check it. It marks any row, column, or diagonal that does not add up to the same total, so you can spot a copied number or a line that needs another look.
Questions
What numbers can I use?
Use a run of consecutive whole numbers, with each number appearing once. Enter the numbers you have in the cells and leave the others empty. The solver checks whether your entries can form a valid square.
What if there are two answers?
The solver tells you when there are two possible completions and shows both. Compare them with the numbers you entered or use the line clues to see how each answer fits.
Does it work for four by four?
Yes. You can enter known numbers in a four by four square, leave the remaining cells empty, and ask the solver to find and count completions.
More puzzles
Math crossword
Fill the grid so every row and column adds up.All levelsMath riddles
Short riddles with a checked answer.All levelsMatchstick puzzles
Move a match to fix the sum.All levelsMissing number
Find the rule, fill the gap.All levelsNumber pyramid
Each brick is the sum of the two below.All levelsPicture puzzles
Work out what each picture is worth.All levelsMake the target
Today’s puzzle: combine the tiles to hit the number.Daily
More ways to play
- Puzzles for kidsTry simple, checked puzzles that let kids practice counting, patterns, shapes, and number moves.
- Puzzles for adultsTry a varied set of puzzles that asks you to plan, calculate, and check each step.
- Target number solverEnter four to six numbers and a target to find routes using plus, minus, times, and divided by.
- 4 × 4 magic squareFill each cell so every row, column and diagonal adds to 34.
- Math mazeFollow the operations from start to target and find the one path that works.
- Magic trianglePlace the numbers so each side of the triangle has the same total.
- ArithmagonFind the hidden corner numbers from the sums shown on each edge.
- Tricky math questionsTest your quick answer, then check the steps that reveal where it went wrong.
- Math logic puzzlesUse the clues to crack a secret code and check your answer on the page.
- Printable crosswordsChoose your level and size, then print a fresh set of math crosswords to solve on paper.
- Daily puzzle archivePlay a make-the-target puzzle for any of the last thirty days at your level.