Magic Square

Arrange the numbers so every row, column, and diagonal adds up to the magic constant.

Today's Daily

The rules

How to play

  1. 01

    The grid

    A magic square is an n×n grid. Fill it so every number from 1 to n² appears exactly once — 1–9 for a 3×3, 1–16 for a 4×4, 1–25 for a 5×5.

  2. 02

    Rows

    Every row must add up to the magic constant. No row can fall short or overshoot the target sum.

  3. 03

    Columns

    The same rule applies vertically: every column must also sum to the magic constant.

  4. 04

    Diagonals

    Both main diagonals — corner to corner — must equal the magic constant too. Rows, columns, and diagonals together define the solution.

  5. 05

    The magic constant

    The target follows M = n(n² + 1) / 2 — that is 15 for a 3×3, 34 for a 4×4, and 65 for a 5×5 grid.

  6. 06

    Prefilled cells

    Shaded cells arrive with fixed numbers you cannot change. They anchor the puzzle and guarantee a single valid solution.

Play smarter

Habits of fast solvers

Use the sums

If a row or column has only one empty cell, the missing number is the magic constant minus the numbers already there.

Check diagonals first

Diagonals have the fewest cells, so they are often the most constrained. Start by looking at what they can hold.

Complementary pairs

Numbers that sum to n² + 1 — like 1+16, 2+15, 8+9 in a 4×4 — pair up. Opposite cells often contain these pairs.

Process of elimination

Track which numbers are already placed. When sum constraints leave only one candidate for a cell, that is your answer.

Trial and error

Sometimes you have to try a number and follow the consequences. If it leads nowhere, undo and try the next one.

Watch & learn

Two minutes to mastery