How to Play Magic Square

Overview

A Magic Square is an ancient mathematical puzzle dating back over 4,000 years. It consists of a grid where you arrange consecutive numbers so that every row, every column, and both main diagonals all sum to the same number - the magic constant. For a 4×4 grid using numbers 1-16, the magic constant is always 34.

Video Tutorial

Rules

  • 1Use each number from 1 to 16 exactly once in the 4×4 grid.
  • 2Each row must sum to 34 (the magic constant).
  • 3Each column must sum to 34.
  • 4Both main diagonals must sum to 34.
  • 5Gray cells contain prefilled numbers and cannot be changed.

The Magic Constant

The magic constant for an n×n magic square using numbers 1 to n² is calculated as:

M = n(n² + 1) / 2
3×3
Magic constant: 15
4×4
Magic constant: 34
5×5
Magic constant: 65

Controls

Drag & DropDrag numbers from the pool onto empty cells
Click CellSelect a cell, then click a number to place it
SwapDrag a placed number onto another cell to swap
RemoveDrag a number back to the pool to remove it
Ctrl+ZUndo last move
Ctrl+YRedo move

Solving Strategies

Use the Sums

If a row or column has only one empty cell, calculate what number is needed: 34 minus the sum of existing numbers.

Check Diagonals First

Diagonals have the fewest cells (only 4), so they're often the most constrained. Start by looking at diagonal possibilities.

Complementary Pairs

Numbers that sum to 17 (like 1+16, 2+15, 8+9) are complementary pairs. In a 4×4 magic square, opposite cells often contain these pairs.

Process of Elimination

Keep track of which numbers are already placed. If a cell can only fit one remaining number based on sum constraints, that's your answer.

Trial and Error

Sometimes you need to try a number and see if it leads to a valid solution. Use undo if it doesn't work out!

History

The earliest known magic square is the Lo Shu Square from ancient China (around 2200 BCE). Legend says it was revealed on the back of a turtle emerging from the Lo River. Magic squares have fascinated mathematicians, artists (like Albrecht Dürer), and mystics for millennia. Benjamin Franklin famously created intricate magic squares as a mental exercise.