The Menger sponge explained

The Menger sponge is a cube with holes in it, and holes in the pieces between the holes, and so on forever. It has no volume and an infinite surface, it contains a copy of every curve you could draw, and it has been folded from business cards, printed in metal and cut into slices full of stars.

A Menger sponge of level 3, a sand-coloured cube pierced by square tunnels of three sizes, the tunnels coloured by depth
A Menger sponge of level 3, a sand-coloured cube pierced by square tunnels of three sizes, the tunnels coloured by depth

Drilling a cube

Cut a cube into 27 equal smaller cubes, like a Rubik's cube. Take out the one in the very middle and the six in the middle of each face: seven cubes go, 20 stay, and a square tunnel now runs straight through the cube in each of the three directions. Do the same to each of the 20 small cubes, then to each of the 400 smaller ones, and so on. The Menger sponge is what is left after doing this forever. A sponge of level n has 20ⁿ cubes: 8,000 at level 3 and 160,000 at level 4.

Karl Menger and the universal curve

The Austrian mathematician Karl Menger described the sponge in 1926 while working out what a curve really is. He proved that the sponge is a universal curve: every curve, however tangled, can be bent into a shape that fits inside it. Its flat cross-section, the Sierpiński carpet, which Wacław Sierpiński had described in 1916, does the same for every curve that can be drawn in a plane. The sponge is one object in which all of them live at once.

No volume, infinite surface

Each level keeps 20 of every 27 cubes, so the volume is multiplied by 20/27 each time: 74% after one level, 30% after four and nothing in the limit. The surface goes the other way. Counting the faces of the cubes that touch empty space gives 2·(20/9)ⁿ + 4·(8/9)ⁿ times the area of one face of the original cube: 8 faces' worth at level 1 instead of 6, more than 51 at level 4, and without limit after that. The sponge is all surface and no inside.

A dimension of 2.727

Shrink a solid cube to a third and you need 27 copies to rebuild it; a square needs 9 and a line 3, that is 3³, 3² and 3¹. The exponent is the dimension. The sponge is rebuilt from 20 copies at a third of the size, so 3ᵈ = 20 and d = log 20 / log 3 ≈ 2.727. It is more than a surface and less than a solid. The same reasoning gives every fractal on this page its number.

Slices full of stars

A straight cut just inside a face shows the Sierpiński carpet. Cut the sponge diagonally instead, at right angles to the line from one corner to the opposite corner, and through the centre, and the cross-section is a regular hexagon filled with six-pointed stars of all sizes, a pattern nobody expected and that has been carved and printed many times since. Move the cut towards a corner and the hexagon shrinks to a triangle with a pattern of its own.

The Jerusalem cube

Eric Baird described the Jerusalem cube in 2011. Instead of 27 equal cells it uses two sizes: 8 corner cubes with side k = √2 − 1 and 12 edge cubes with side k², sitting flush with the outside between the corners. The numbers fit exactly because 2k + k² = 1. The holes form crosses like the Jerusalem cross. Its dimension d solves 8kᵈ + 12k²ᵈ = 1, which gives about 2.529, and its pieces of different sizes give it a look quite unlike the sponge.

The Sierpiński tetrahedron, the Mosely snowflake and Cantor dust

The Sierpiński tetrahedron keeps the four corner tetrahedra of half the size and drops the octahedron in the middle. Its copies touch only along edges, so its surface never changes while its volume halves at every level, and its dimension is exactly 2. The Mosely snowflake, named after Jeannine Mosely, who built a level-3 sponge from 66,048 business cards, keeps the 12 edge cells and the 6 face centres: dimension log 18 / log 3 ≈ 2.631. Cantor dust keeps only the 8 corners, which never touch: its surface shrinks along with its volume, and what is left is a cloud of separate points of dimension log 8 / log 3 ≈ 1.893.

Explore them

Open the Menger sponge app, drag to turn the shape and press Step to drill the next level: the parts that go shrink away into the middle of each cube. Colour the tunnels by the level that drilled them, compare the five shapes, and switch on the slice to cut them open straight or diagonally. The tiles give the number of pieces, the volume, the surface and the dimension, and the pencil opens the picture in the photo editor with the shadow, the shape, the edges and the slice on separate layers.

Frequently asked questions

How many cubes does a Menger sponge have?

20ⁿ at level n: 20 at level 1, 400 at level 2, 8,000 at level 3 and 160,000 at level 4. Each level replaces every cube by 20 cubes a third of its size.

What is the surface area of a Menger sponge?

With the original cube's faces of area 1, level n has an exposed surface of 2·(20/9)ⁿ + 4·(8/9)ⁿ: 6 for the cube, 8 at level 1, about 13 at level 2, about 25 at level 3 and about 51 at level 4. It grows without limit as the levels go on, while the volume (20/27)ⁿ goes to zero.

Is the Menger sponge the 3D version of the Sierpiński carpet?

Yes. Each face of the sponge is a Sierpiński carpet, and the carpet is to the square what the sponge is to the cube: cut into 3 × 3, remove the middle, repeat. The carpet has dimension log 8 / log 3 ≈ 1.893 and the sponge log 20 / log 3 ≈ 2.727.

Who made the business card Menger sponge?

Jeannine Mosely, an American engineer and origami artist, led the folding of a level-3 Menger sponge from 66,048 business cards in the mid-2000s. Each small cube is folded from six cards and the cubes lock together without glue. The Mosely snowflake, another cube fractal in the app, is named after her.

Why is the Sierpiński tetrahedron's dimension exactly 2?

It is made of four copies of itself at half the size, and 2ᵈ = 4 gives d = 2. Although it is a three-dimensional shape with volume that vanishes, it behaves like a surface: its four copies touch only along edges, so the total area of its faces never changes from one level to the next.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

Open the Menger sponge in 3D