Magic Square: 1514 Sits in Dürer’s Bottom Row
Explorable Illusions · Published
Pick any row, column or diagonal of this square; it adds up to 34. That property makes it a magic square, a grid of numbers in which every row, every column and both main diagonals share the same total. Albrecht Dürer engraved this particular square into Melencolia I, a print dated 1514, and the middle of its bottom row reads 15 14. This page's program counts 7,040 magic squares of this size that use the numbers 1 to 16 exactly once, or 880 if the turns and flips of one square count only once.
Protocol · 4 parts
At a glance
- Name
- Magic square
- Also called
- Dürer's magic square (the 4 x 4 square in Melencolia I)
- First recorded
- This entry starts from Albrecht Dürer's engraving Melencolia I, dated 1514; it does not date the earliest magic square
- Type
- Number arrangement: every row, column and main diagonal has the same sum
- Main explanations
- Checked by exhaustive count: Dürer's square uses 1 to 16 once and all ten lines add to 34; 86 sets of four cells add to 34 in any arrangement of 1 to 16; there are 7,040 magic squares of order 4, or 880 if turns and flips of one square count once, a first full count credited to Frénicle de Bessy (1693)
- On this page
- Static figures and recomputable data: every set of four that adds to 34, and the full counts of 3 x 3 and 4 x 4 squares
magic-square-glance.csv (CSV) · what the file holds and its license
Before reading further, add up the four corners, 16, 13, 4 and 1, and then try the four cells in the middle. On this page, the gasp point arrives in the second section as a shuffle: mix the sixteen numbers at random, and exactly 86 sets of four still add up to 34.
Where is the square in Melencolia I?
Melencolia I is a copper engraving by Albrecht Dürer, the Nuremberg artist who lived from 1471 to 1528. The impression in the National Gallery of Art in Washington is a sheet 24.2 centimeters tall and 18.8 centimeters wide. The square hangs on a wall in the upper right corner, beneath a bell and beside an hourglass, above a seated winged figure.

Several digits are cut in older shapes: the 5 resembles a tall S, and the 9 curls like a hook. Read cell by cell from the museum's scan, the engraved square matches the version drawn above:
| Column 1 | Column 2 | Column 3 | Column 4 | |
|---|---|---|---|---|
| Row 1 | 16 | 3 | 2 | 13 |
| Row 2 | 5 | 10 | 11 | 8 |
| Row 3 | 9 | 6 | 7 | 12 |
| Row 4 | 4 | 15 | 14 | 1 |
What the square symbolizes inside the print is a question for art historians, and no source this page could read settles it. This page sticks to what anyone can check: the numbers and their totals.
How many sets of four add up to 34?
Rows, columns and diagonals are only ten of the possible ways to choose four cells from sixteen. There are 1,820 combinations altogether, and this page's program tested every one of them. In Dürer's square, 86 of those combinations add up to 34.
Many of the 86 form recognizable shapes. Five of the nine 2×2 blocks total 34: the four corner quarters and the central block. The four corners of the whole square also qualify, along with 14 more sets that mark the corners of a rectangle with sides along the grid lines.
A separate pattern explains 22 more sets. Every cell and the cell directly opposite it through the center add to 17, as with 16 and 1 or 3 and 14, so any two of these mirror pairs together make 34.
Now the twist. The number 86 does not depend on Dürer's arrangement at all, because exactly 86 combinations of four different numbers from 1 to 16 add up to 34, wherever those numbers sit in the grid. Any shuffle of the sixteen numbers leaves the count at 86; what Dürer's layout controls is how many of the 86 form tidy shapes, which here is 52.
The birthday paradox works the same way, since its surprise comes from counting groups, such as the 253 pairs among 23 people, rather than from any single person.
What does the bottom row say?
The bottom row of the square reads 4, 15, 14, 1, so its two middle cells, side by side, spell 15 14. The engraving carries the date 1514 in its lower right corner, cut just above an A and a D.
The program checked how often that happens. Of all 7,040 magic squares that use 1 to 16, it found only 32 with 15 followed by 14 in the middle of the bottom row, and only 10 with the complete bottom row 4, 15, 14, 1, including Dürer's own. No source read for this page records whether the date came first in his design.
How many 4×4 magic squares are there?
A square can be rotated a quarter, a half or three quarters of the way around, and each position can also be flipped over, which gives 8 views of one square. For Dürer's square, all 8 views are different. Every one of them is still a magic square.
The program examined every way to fill a 4×4 grid with 1 to 16 so that each row totals 34, then tested the columns and diagonals of each candidate. It found 7,040 magic squares. Every square had 8 distinct views, so 7,040 ÷ 8 = 880.
A 2013 paper by the mathematicians Stefano Barbero, Umberto Cerruti and Nadir Murru reports the same two numbers and credits the first complete count to Frénicle de Bessy, in 1693. For a 3×3 grid of the numbers 1 to 9, the same exhaustive search finds 8 magic squares, all of them views of a single square. As with the walks in the Seven Bridges of Königsberg, the answer comes from checking every possible case, not from a clever guess.
Check it yourself
Every count below is exact. As in the Benford's law entry, nothing is sampled, because the program lists every case. The third column describes Dürer's square with its first two columns exchanged (see Now break it).
| Count | Dürer's square | Columns 1 and 2 swapped |
|---|---|---|
| Lines (of 10) that add to 34 | 10 | 8 |
| Sets of four cells (of 1,820) that add to 34 | 86 | 86 |
| Of those, sets in a tidy shape | 52 | 32 |
| Of those, sets with no simple shape | 34 | 54 |
| Cell and opposite cell always add to 17 | yes | no |
| Grid | Magic sum | Magic squares | Counting turns and flips once |
|---|---|---|---|
| 3×3, numbers 1 to 9 | 15 | 8 | 1 |
| 4×4, numbers 1 to 16 | 34 | 7,040 | 880 |
Download every set of four that adds to 34 (CSV) · what the file holds and its license
Download the full count of 3×3 and 4×4 squares (CSV) · what the file holds and its license
Now break it
Exchange the first two columns of Dürer's square. Every row keeps the same four numbers, and every column keeps its own numbers too, so all eight of those lines still total 34.
The diagonals are what break: one drops to 16 and the other climbs to 48, so the grid is no longer magic. All 86 sets of four that add to 34 are still present, but only 32 of them now form tidy shapes, down from 52.
Try exchanging the two middle columns instead. The program reports that this swap keeps all ten lines at 34, so the result remains a magic square.
Try this next: 15 puzzle — the same 4×4 frame, with fifteen sliding tiles and one swap of 14 and 15 that no amount of sliding can make.
Sources
- Albrecht Dürer, Melencolia I, engraving, 1514. National Gallery of Art, Washington, Rosenwald Collection, 1943.3.3522; scan released by the museum under CC0 on Wikimedia Commons. https://commons.wikimedia.org/wiki/File:Albrecht_D%C3%BCrer,_Melencolia_I,_1514,_NGA_6640.jpgRead: file page and full-resolution scan; the square and the date checked cell by cell
- Stefano Barbero, Umberto Cerruti and Nadir Murru, “Squaring the Magic Squares of Order 4,” arXiv:1302.1163 (2013); Journal of Algebra, Number Theory: Advances and Applications 7, no. 1 (2012): 31–46. https://arxiv.org/abs/1302.1163Read: pages 1–3 (introduction and section 2)
Cite this page
Explorable Illusions. (2026). Magic Square: 1514 Sits in Dürer’s Bottom Row. Explorable Illusions. Published 2026-11-13. https://explorableillusions.com/math-toys/magic-square/
Add the date you read it. Figures and CSV files on this page are CC BY 4.0 unless their credit line says otherwise.
How pages here are checked Corrections log Report an error: contact@explorableillusions.com
More in Puzzles, Fractals & Math Toys
Puzzles, Fractals & Math ToysMandelbrot Set: Exact Area Still Unknown as of 2026
Square, add c, repeat: the Mandelbrot set is every point that never escapes. As of 2026 its exact area is unknown; grid counts put it near 1.51.
Picture credit
"The Mandelbrot set, full view" by Explorable Illusions — https://explorableillusions.com/math-toys/mandelbrot-set/ — CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
Puzzles, Fractals & Math ToysSeven Bridges of Königsberg: No Walk Crosses Each Once
The seven bridges of Königsberg join four lands that touch 5, 3, 3 and 3 bridges. See why no walk crosses each bridge once, and why dropping any one fixes it.
Picture credit
"Topographia Practica – 3. Regiomontum (Königsberg)" by Fryderyk Getkant — https://commons.wikimedia.org/wiki/File:Topographia_Practica_-_3._Regiomontum.jpg — Public domain (US: hand-drawn map made 1634–39 by an author who died in 1666, public domain whether counted as published (before 1931) or unpublished (life plus 70 years); EU: author d. 1666, more than 70 years ago); modified: scaled from 7,544 to 1,600 px wide; no crop, no colour change
Puzzles, Fractals & Math Toys15 Puzzle: With 14 and 15 Swapped, No Solution Exists
Swap tiles 14 and 15 in a 15 puzzle and no series of slides can fix it. Count the pairs out of order to see why, as Johnson and Story proved in 1879.
Picture credit
"15-14-13. The great presidential puzzle (Puck, 1880)" by James Albert Wales — https://commons.wikimedia.org/wiki/File:15-14-13._The_great_presidential_puzzle_-_J.A._Wales._LCCN2007684705.jpg — Public domain (US: published 1880 in Puck; EU: artist James Albert Wales d. 1886, per the Library of Congress catalog); modified: cropped to the printed picture, removing the album page and the printed title, publisher and lithographer lines below it; scaled to 1600 px wide