Ludozio
Games · Number · Magic Square

Magic Square

‹ deal ›
Time 0:00 Moves 0

How to play the Magic Square

The Magic Square is played on a square grid three, four or five cells to a side depending on difficulty. You place the numbers 1 to n², each exactly once, so that every row, every column and both main diagonals reach the same total. A few cells are filled in from the start: together with the sum rule, they pin down a single unique solution.

  1. Read the magic sum The magic constant M is shown above the grid: it is the total that every row, every column and each diagonal must reach. It equals M = n·(n²+1)/2, which comes to 15 on a 3x3 grid, 34 on a 4x4 and 65 on a 5x5.
  2. Start from the given cells A handful of numbers are already in place at the start. Use them as anchors: each given cell constrains its row, its column and sometimes a diagonal, narrowing down what can go in the neighbouring cells.
  3. Place the remaining numbers Select a cell then type a number, or use the pad. Each number from 1 to n² is used only once; type the same number again to clear a cell, and press two digits in a row to enter a two-digit number.
  4. Check every total Row and column totals appear in the margin, diagonal totals in the header. They turn green when a line is complete and correct, red when the sum is wrong or a number is repeated. The grid is solved once everything shows green.
Full rules

Magic Square is played on a square grid n cells to a side (3, 4 or 5 depending on difficulty). The goal is to place each of the numbers 1 to n² exactly once so that every row, every column and both main diagonals share the same total: the magic constant M = n·(n²+1)/2, shown above the grid.

A few cells are given at the start; together with the sum rule they pin down a single unique solution. Each row and column total appears in the margin, and the diagonal totals in the header: they turn green when the line is complete and correct, red when the total is wrong.

Select a cell then type a number (or use the pad); type the same number again to clear it. On the larger grids, press two digits in a row on the keyboard to enter a two-digit number. A duplicated number, or a completed line whose sum is not M, is flagged in red. Undo freely, or ask for a hint to reveal a cell.

Solving techniques
Work out the magic sum first

Before placing anything, note the constant M. Every deduction flows from it: as soon as a row or column is almost full, the missing cell is found by simply subtracting the numbers already there from M.

The centre of an odd grid

On an odd-sided grid such as the 3x3 or 5x5, the centre cell holds the middle value of the number set: 5 on a 3x3, 13 on a 5x5. Fixing that anchor settles the heart of the grid and guides the rest of your placements.

Finish lines with one blank left

Always look for the row, column or diagonal with only one empty cell. Its content is forced: it is M minus the sum of the numbers already present. These certain cells often unlock several others in turn.

Balance large and small numbers

A line made only of large numbers overshoots M, while a line of small numbers falls short. Spread the high and low values around so that each total lands close to the magic constant.

Frequently asked questions

What is the magic sum and how do I find it?

It is the total that every row, every column and both diagonals must reach. It is worked out with the formula M = n·(n²+1)/2 and is shown right at the top of the grid. You never have to guess it: it comes to 15 on a 3x3, 34 on a 4x4 and 65 on a 5x5.

Which numbers are used?

You use each whole number from 1 to n² once, where n is the side of the grid. That means the numbers 1 to 9 on a 3x3 grid, 1 to 16 on a 4x4 and 1 to 25 on a 5x5. No number is ever repeated.

Is there a unique solution?

Yes. The few cells given at the start are chosen so that only one arrangement satisfies all the sums. By reasoning from the magic constant and the numbers already placed, you always reach that single solution.

Do I need an account to play?

No. The Magic Square runs straight in your browser, with no sign-up and no account. You open the page and start playing right away.

Can I play offline and resume later?

Yes. Once the page has loaded, the game works without a connection and your game in progress is saved in the browser. You can close the tab and pick the grid back up exactly where you left off.

Is the daily grid the same for everyone?

Yes. The Magic Square offers a daily grid: the same puzzle of the day is shared by all players on a given date. An archive also lets you go back to grids from previous days.

Come back tomorrow Five puzzles a day, the same for everyone. See today's five
This grid
LevelEasy