AbraCalc

Magic Square — Arrange Numbers to Equal Sum

Arrange 1-9 in a 3x3 grid so every row, column and diagonal sums to 15.

Drag numbers into the grid — every row, col and diagonal must sum to 15.
Number bank (click to select, then click a cell):
Embed this tool on your site
Cite this tool

APA

AbraCalc. (2026). Magic Square — Arrange Numbers to Equal Sum [Online calculator]. Retrieved from https://abracalc.com/game/magic-square/

BibTeX

@misc{abracalc-magic-square, author = {AbraCalc}, title = {Magic Square — Arrange Numbers to Equal Sum}, year = {2026}, howpublished = {\url{https://abracalc.com/game/magic-square/}} }

Did this tool answer your question?

How to play

  1. Click a number (1–9) in the bank to select it, then click an empty grid cell to place it.
  2. Click an occupied cell to remove a number back to the bank.
  3. Every row, column, and both diagonals must sum to exactly 15.
  4. The hint panel on the right shows running sums as you fill the grid.
  5. Click 'Check' once all 9 cells are filled.

Place the numbers 1 through 9 in a 3x3 grid so that every row, column, and diagonal adds up to exactly 15. Click a number from the bank, then click a cell to place it.

How it works

Magic Square challenges you to arrange the numbers 1 through 9 in a 3x3 grid so that every row, every column, and both main diagonals all sum to exactly 15. Each number is used exactly once.

The puzzle is a classic mathematical recreation. The target sum of 15 follows directly from the fact that 1 through 9 sum to 45, and there are three rows, so each row must average 15. The same logic applies to columns and diagonals.

There is essentially one fundamental solution (rotation and reflection produce all eight variants): place 5 in the center, even numbers in the corners, and odd numbers on the edges. Use this knowledge as a guide when you get stuck — 5 always belongs in the center cell.

This tool is useful for teaching number sense, exploring combinatorial constraints, or simply enjoying a satisfying arrangement puzzle.

Worked example

Solving the magic square from scratch

  1. Place 5 in the center cell — it is the only number that can occupy the center in a valid 3x3 magic square.
  2. Place 2, 4, 6, 8 (even numbers) in the four corner cells.
  3. Place 1, 3, 7, 9 (odd numbers) in the four edge (non-corner) cells.
  4. Arrange them so each row and column sums to 15 — for example, top row: 2, 7, 6.
  5. Verify both diagonals: 2+5+8=15 and 6+5+4=15.

A complete 3x3 magic square where every row, column, and diagonal sums to 15.

Common mistakes to avoid

  • Placing 5 anywhere other than the center, which makes a valid solution impossible.
  • Placing two odd numbers in corners or two even numbers on edges, which breaks the underlying structure of the solution.
  • Checking only rows and columns while forgetting to verify both diagonal sums.

Key terms

Magic constant
The required sum for each row, column, and diagonal — 15 for the standard 3x3 magic square using 1 through 9.
Magic square
A grid of distinct integers where all rows, columns, and main diagonals share the same sum.
Rotation/Reflection
Transformations that produce equivalent magic squares; all eight variants of the 3x3 square are rotations or reflections of one fundamental solution.

Frequently asked questions

What is a magic square?
A magic square has numbers arranged so every row, column, and diagonal sums to the same value — in this 3x3 case, that's 15.
Is there more than one solution?
For a 3x3 magic square using 1–9, there are 8 solutions (rotations and reflections of the same pattern).