Magic Square Generator – Same Row/Column/Diagonal Sum

Generate unlimited puzzles. Choose 3×3 or 4×4. Set a Target Sum (must be divisible by size), and fill the blanks so all rows, columns, and diagonals match the target.

Size
Target Sum
Difficulty

How generator works (simple + correct):

  • Starts from a correct base magic square.
  • Applies rotations/reflections (still magic).
  • Shifts every cell by k so the new target sum is reached (still magic).
  • Removes some cells based on difficulty.

Important: for integer puzzles, Target Sum must be divisible by the size (3 or 4).

00:00
Generated Puzzle In progress
📊 Recent Attempts (this browser)

Last 10 attempts are saved locally in this browser.

Date / Time Size Target Result Time Checks