Sierpinski Triangle

Draw the Sierpinski triangle at any level from 0 to 9: start with one triangle, take out the middle one, and repeat on every triangle that is left. The tool counts the triangles and the area that is left, colours them by corner, and prints a colouring sheet, a cut-out template, a poster at real size over several sheets, or every level side by side. It also makes the same shape two other ways, with the chaos game (random points) and with the odd numbers of Pascal’s triangle, and draws the square version, the Sierpinski carpet. Download a PDF, a 300 DPI PNG or an SVG. Nothing is uploaded.

100% private — everything runs in your browser. Everything runs in your browser; nothing is uploaded.

100% private — runs in your browser

Print at 100% (Actual size). Real size prints across as many sheets as it needs: cut each sheet on its dashed line and butt the edges together, matching the corner marks. The SVG holds the drawing at real size.

Drawing

Colours

Page

Runs in your browser with our own code: nothing you type is uploaded or saved. Every triangle, square, point and number is generated and counted by our own code. You may use what you make here, including commercially, with no credit needed.

How to make and print a Sierpinski triangle

  1. Pick a preset, or choose what to draw: the filled triangle, outlines, the cut-out template, levels side by side, the chaos game, Pascal’s triangle or the carpet.
  2. Set the level (or the number of points for the chaos game) and the colours.
  3. Type the side length and choose Fitted to one page or Real size (tiled over sheets if it is bigger than the paper).
  4. Check the counts under the preview.
  5. Download the PDF and print at 100% (Actual size), or the PNG or SVG.

What you can use it for

  • Maths lessons: self-similarity, powers of 3 and limits
  • Colouring sheets and classroom displays
  • Cut-paper and stencil projects from the cut-out template
  • Posters and wall art at real size
  • Pascal’s triangle and odd and even numbers
  • Pen plotter, laser and vinyl art from the SVG

The 16 presets

PresetLevelWhat is drawnSidePrint
Classic triangle, level 5 (243 triangles)5243 triangles180 mmfitted
Three corners in three colours, level 66729 triangles180 mmfitted
Colour by address sum, level 4481 triangles180 mmfitted
Fine detail, level 8 (6,561 triangles)86,561 triangles180 mmfitted
Level 9 (19,683 triangles)919,683 triangles180 mmfitted
Colouring sheet: level 4 outlines481 triangles180 mmfitted
Cut-out template, level 3 (13 holes)313 holes to cut150 mmfitted
Levels 0 to 5 side by side5levels 0–5180 mmfitted
Chaos game: 10,000 points–10,000 points180 mmfitted
Chaos game: 30,000 points coloured by corner–30,000 points180 mmfitted
Pascal’s triangle mod 2: 16 rows with the numbers416 rows, 81 odd180 mmfitted
Pascal’s triangle mod 2: 64 rows664 rows, 729 odd180 mmfitted
Sierpinski carpet, level 3 (512 squares)3512 squares180 mmfitted
Sierpinski carpet, level 5, corner and edge colours532,768 squares180 mmfitted
Poster: 600 mm triangle, level 6, real size on tiled sheets6729 triangles600 mmreal size, 12 sheets (Letter)
Card-size triangle: 4 in, level 4, real size481 triangles0.16 inreal size, 1 sheet (Letter)

Every count is worked out by the tool from the shapes it draws.

Triangles, area and holes at each level

LevelTrianglesArea leftTriangles cut outCount checked
01100%0yes
1375%1yes
2956.25%4yes
32742.1875%13yes
48131.6406%40yes
524323.7305%121yes
672917.7979%364yes
72,18713.3484%1,093yes
86,56110.0113%3,280yes
919,6837.5085%9,841yes

Each level keeps 3 of the 4 half-size triangles, so the count triples and the area left is multiplied by 3/4.

Pascal’s triangle mod 2

RowsNumbersOdd numbers (filled)Same cells as the Sierpinski triangle
233yes
4109yes
83627yes
1613681yes
32528243yes
642,080729yes

The tool fills the odd numbers and compares them cell by cell with the triangles of the same level.

The Sierpinski carpet

LevelSquaresArea leftSquares taken out
01100%0
1888.8889%1
26479.0123%17
351270.2332%217
44,09662.4295%2,465
532,76855.4929%26,281

Each level keeps 8 of the 9 third-size squares.

What prints

DownloadWhat is in it
PDFThe drawing fitted to one page or at real size on tiled sheets, vector, with the counts and a check bar on every sheet
PNG 300 DPIThe same sheets as pictures (a ZIP when there is more than one)
SVGThe drawing at real size, one path per colour

For a cutter that needs DXF, use SVG to DXF.

Which tool to use

You wantUse
The Sierpinski triangle or carpet, the chaos game or Pascal’s triangle mod 2, with counts and a printSierpinski Triangle (this page)
Mandelbrot and Julia sets, or line fractals such as the Koch snowflake and the Sierpinski arrowhead curveFractal Generator
A cube sponge made of smaller cubesMenger Sponge
Repeating tile patternsTruchet Tiles
Triangle-grid paper for your own drawingsIsometric Graph Paper

Other tools: the Fractal Generator renders Mandelbrot, Julia and line fractals, Truchet Tiles makes tile patterns and Isometric Graph Paper prints triangle grids.

More free tools

Geometry, patterns and printables?

Drawing and print tools that run privately in your browser, with no sign-up and no watermark.

See all free tools →

Frequently asked questions

What is the Sierpinski triangle?

A shape made by starting with a triangle, joining the midpoints of its sides and taking out the middle triangle, then doing the same to each of the three triangles that are left, again and again. Each round is a level. It is named after Wacław Sierpiński, who described it in 1915.

How many triangles are there at each level?

At level n there are 3 to the power n triangles, each half the size of those at the level before, and together they cover (3/4) to the power n of the first triangle. The table below gives every level from 0 to 9; our tests count the triangles the tool draws and add up their areas exactly.

What is the chaos game?

Start at any point, pick one of the three corners at random and move half way towards it, then repeat. After a few moves every point lands on the Sierpinski triangle. The tool starts at the centre, does 20 moves before it draws anything, and uses a seed so the same seed always gives the same picture. Our tests check that every drawn point lies inside the level-6 triangles.

How is it related to Pascal’s triangle?

Write out Pascal’s triangle with 2, 4, 8, 16, 32 or 64 rows and fill in the odd numbers: the filled cells are exactly the Sierpinski triangle of that level. Our tests check this for every cell up to 64 rows.

What is the Sierpinski carpet?

The square version: cut a square into 9, take out the middle one and repeat on the 8 that are left. Level n has 8 to the power n squares covering (8/9) to the power n of the square. Sierpiński described it in 1916.

What is its fractal dimension?

The Sierpinski triangle is made of 3 copies of itself at half the size, so its dimension is log 3 / log 2, about 1.585. The carpet is 8 copies at a third of the size: log 8 / log 3, about 1.893.

How is this different from the Sierpinski arrowhead on the Fractal Generator?

The arrowhead there is a single wiggly line (an L-system curve) that fills in the same outline as it gets longer. This page draws the triangle itself, the filled triangles that are left after cutting out the middles, and counts them.

How do I use the cut-out template?

Print it, then cut out every dashed triangle. What is left is the level you chose. Level 3 has 13 triangles to cut out; level n has (3 to the power n − 1) / 2.

How does the real-size print work when the drawing is bigger than the paper?

Choose Real size. The tool splits the drawing over as many sheets as it needs, each with a dashed edge, corner marks and a label such as A1 (row A, column 1). Cut each sheet on its dashed line, butt the edges together in order and tape them. Every printed corner is at its true position to within 0.2 mm in our tests, on US Letter and A4, as long as you print at 100% (Actual size); the check bar on each sheet lets you confirm the scale.

Is it free?

Yes. There is no sign-up, no watermark and no limit.

Is anything uploaded?

No. Every shape and number is worked out by JavaScript in your browser. Nothing you type is sent anywhere or saved when you close the page.