Magic Square Generator

Make magic square worksheets to print: grids of numbers whose rows, columns and two diagonals all give the same total, the magic sum, with a few cells left empty to fill in. They turn addition and subtraction into a puzzle that checks itself.

Choose the grid, 3 x 3 or 4 x 4, then its numbers: 1 to 9, up to 30 or up to 100 in a 3 x 3 square, 1 to 16 or up to 100 in a 4 x 4 square. Print one large square on a page, four, or six small 3 x 3 squares, and tick Show the magic sum to print that total below each square as a hint. Numbers and the magic sum take the Font you set, round Pebble or print-style Granite, while every square keeps its size on the page.

Every square can be completed cell by cell, without guessing, and the answer key gives the missing numbers in orange dots.

Version 8. Last updated on Mon, 02 Nov 2026.

An example page of the Magic Square Generator, ready to print.

Examples

The latest printable pages whose sheets were made with this generator, ready to download.

A page of four 4x4 magic squares, six blanks in every grid.
4x4 Magic Squares – 4 per Page (24 Printables)

Twenty-four pages of four 4x4 magic squares: twelve built from 1 to 16 and twelve with numbers as large as 100, the first three of each half showing every total.

One large 4x4 magic square with six empty cells, in black and white.
4x4 Magic Squares (24 Printables)

Twenty-four large 4x4 magic squares, one per sheet: twelve built from 1 to 16, totaling 34, and twelve with larger numbers and a total of their own, three of each with the total printed.

Six small 3x3 magic squares on one page, each with four empty cells.
3x3 Magic Squares – 6 per Page (24 Printables)

Twenty-four pages holding six 3x3 magic squares each, the most practice on one sheet, with Lo Shu squares first and two-digit numbers later.

Four 3x3 magic squares with numbers up to 30 and empty cells, on one page.
3x3 Magic Squares – 4 per Page (24 Printables)

Twenty-four pages, each with four 3x3 magic squares to complete, moving from the numbers 1 to 9 to two-digit numbers, for regular practice of sums and differences.

Frequently Asked Questions

What Can You Make With the Magic Square Generator?

Worksheets of magic squares with empty cells, in a 3 x 3 or a 4 x 4 grid, with three sets of numbers for the first and two for the second, and one, four or six squares to a page, six for 3 x 3 squares only. Each worksheet has its answer key, and the magic sum can be printed under every square. Two lines of instructions open each worksheet, the rule of the equal sums, then which numbers to use or simply to fill in the gaps; untouched, the Show the instructions box keeps them, and clearing it removes them.

What Is a Magic Square?

A square of numbers in which each row, each column and the two diagonals reach one shared total, the magic sum. The Lo Shu square, the oldest one known, comes from ancient China: it holds the numbers 1 to 9, each once, and every line of it adds up to 15. A 4 x 4 magic square has ten lines to check, four rows, four columns and two diagonals; with each number from 1 to 16 once, its magic sum is 34.

How Do You Fill In a Magic Square?

First find the magic sum: add the numbers of a full row, column or diagonal; every square of these worksheets has one. Then look for a line with a single empty cell: the magic sum minus the numbers already there gives the missing one. Each number found completes other lines, and the square fills up cell by cell. Checking is easy: every line of the finished square must give the magic sum.

Why Is the Middle Number One Third of the Sum?

In any 3 x 3 magic square, four lines pass through the center: the middle row, the middle column and both diagonals. Together they add up to four times the magic sum, and they cover every cell of the square once, except the center, which they count four times. The three rows also cover every cell once and add up to three times the sum; the difference, one more magic sum, is three extra copies of the center. So the center is the sum divided by 3: 5 in the Lo Shu square, whose lines make 15.

Which Grid and Numbers Should I Choose?

The Lo Shu square, a 3 x 3 grid with the numbers 1 to 9, is the first step: four empty cells, and a sum that is always 15. The 3 x 3 squares with bigger numbers, up to 30 or 100, keep five cells empty and bring bigger sums, for practice with larger numbers. The 4 x 4 squares come next: with the numbers 1 to 16, six cells are empty; up to 100, the sum changes from square to square and seven cells are empty, the most a 4 x 4 square can leave and still be solved one cell at a time.

How Many Squares Should I Put on a Page?

One square fills the page with large cells, easy to write in for young children or to show on a board. Four squares make a short practice sheet, with cells still roomy. Six 3 x 3 squares, two by two in three rows, give the most practice on one sheet. Whatever the number, the answer key matches the page square for square.

What Does Show the Magic Sum Do?

It writes SUM = and the magic sum under each square, so the first step is done: the child starts at once with the lines that have one empty cell. Without it, the sum comes from the full line. The hint helps most with the 4 x 4 squares up to 100, whose sum is different on every square.

What Does the Answer Key Show?

Show the solution writes the number of every empty cell in orange dots, so the completed square can be checked line by line: every line, across, down or corner to corner, must reach the magic sum. On a page of four or six squares, every square gets its own answers in the same place.

What Age Are Magic Squares For?

The Lo Shu square, made of 1 to 9 with a sum of 15, suits children who add three small numbers, from about first or second grade; finding a missing number is then a subtraction from 15. Squares of nine cells holding larger numbers fit second and third graders working on sums within 100, and the 4 x 4 squares, with four numbers per line and sums that can pass 100, suit third grade and beyond, as well as adults who like number puzzles.

How Does the Magic Square Generator Work?

Every 3 x 3 magic square is built around its center: its sum is three times the center, and two steps set around it give the other numbers. The Lo Shu square is the only one with the numbers 1 to 9, shown turned or flipped in one of its eight positions; the squares up to 30 and up to 100 draw their center and steps at random. A 4 x 4 square using each number from 1 to 16 comes from a search that tries the free numbers line after line, among 7,040 possible squares; one up to 100 draws its sum and seven cells, and works out the eight others. Each square is then turned or flipped at random, and its empty cells are chosen so that a full line gives the sum and some line always has a single empty cell left.