Magic square solver
Learn more with Tiger
A magic square is a square grid of distinct positive integers arranged so that every row, every column, and both main diagonals all sum to the same number -- the magic constant.
Key Facts
- For an magic square using the integers to , the magic constant is .
- A 3x3 magic square has ; a 4x4 has .
- The center cell of a 3x3 magic square always equals .
Worked Example
Complete the 3x3 magic square:
Solution: 6 1 8 / 7 5 3 / 2 9 4 (every line sums to 15).
Why It Matters
- Develops logical reasoning and constraint-satisfaction thinking
- Appears in recreational mathematics, combinatorics, and puzzle competitions
- Historical significance in number theory (Lo Shu square, Albrecht Dürer)
Try It
Enter a partial magic square like _,1,_,_,5,_,_,9,_ or specify the size and known values to get a step-by-step solution.
Teacher review: Magic square solver
- Name the given values and the unknown before calculating.
- Apply the core rule: for a normal magic square, the magic sum is .
- Check the answer in the original problem, not only in the simplified line.
Example
for , each row, column, and diagonal sums to . Compare the solver steps with the rule above before trusting the final answer.