Geometry · playable

Polygon angles

Every many-sided shape hides two rules that never break. Add a side, watch them hold.

Start here
The whole idea

Two patterns. They hold for any number of sides.

Pick any polygon — a triangle, a hexagon, a wild 12-sided shape. Its inside angles always add up to (n − 2) × 180°, where n is the number of sides. And the little turns you make walking around its outside always add up to one full spin: 360°.

That's it — the rest of this page is just you proving those two sentences to yourself with your own hands. You'll build a shape side by side and watch the totals update live, slice a polygon into triangles to see why the formula works, and walk a full lap to feel where the 360° comes from. By the end, neither rule will feel like magic. They'll feel obvious.

First, the word

What even is a polygon?

A polygon is a flat shape made of straight sides that join up into a closed loop — no gaps, no curves, no loose ends. Triangles, squares, pentagons, stop signs: all polygons. A circle isn't (it's curved). The letter C isn't (it's not closed). A shape with a curved edge isn't, either.

A few words we'll use the whole way through, so let's pin them down now. The corners are called vertices (one corner is a vertex). The number of sides gets its own letter, n — a triangle is n = 3, a hexagon is n = 6. Handily, a polygon always has the same number of sides as corners, so n counts both. A polygon is regular when every side is the same length and every angle is equal (think of a perfect honeycomb cell); it's irregular when they're not (think of a random scribbled shape that still closes up).

Here's the part that surprises people: the two angle rules on this page work for both regular and irregular shapes. You can squash a hexagon, stretch it, tilt every side at a different angle — as long as it stays a closed six-sided loop, its interior angles still add to the same total. The shape's total is fixed by how many sides it has; only the share each corner takes can move around. Regular shapes are just the easiest to draw and the easiest to picture, so that's what you'll see on the canvases below.

One more pair of words you might meet: a polygon is convex when none of its corners poke inward (every interior angle is under 180°), and concave when one caves in like a dent or an arrowhead. Don't worry about concave ones here — the demos all stay convex — but it's nice to know the rules survive even those.

Quick warm-up: tap each shape below and decide for yourself — polygon, or impostor?

Tap a shape to check it.

A polygon needs all three: straight sides, fully closed, and flat. Miss one and it's out.

The main event · build it

Add sides. Watch the totals chase the formula.

Here's your workshop. Press Add a side to grow the shape from a triangle all the way to a 12-sided dodecagon — or drag the slider straight to any n. Two numbers update with every click: the interior total (all the inside corner angles added together) and the exterior total (the corner-turns on the outside).

Keep your eye on them as n climbs. The interior total grows — and it grows in steps of exactly 180°, because each new side quietly adds one more triangle's worth of angle. The exterior total does something stranger: it refuses to budge. No matter how many sides you pile on, it stays locked at 360°.

Try this little experiment as you play. Start at the triangle: the interior sum reads 180°, because a triangle is just one triangle — nothing added yet. Click once to a quadrilateral (a four-sided shape, like a square) and the total jumps to 360°. Click again to a pentagon and it's 540°. Each click adds 180°, like clockwork. Meanwhile the each exterior readout keeps shrinking — 120°, then 90°, then 72° — because the same single lap is being split into more and more, smaller and smaller turns. Flip the Show exterior angles toggle to see those turns marked on the shape itself.

add sides · watch the numbers
5
Shape
pentagon
Triangles (n−2)
3
Interior sum
540°
Each interior
108°
Exterior sum
360°
Each exterior
72°

(5 − 2) × 180° = 540° inside  ·  always 360° outside

The interior sum is the headline. The exterior sum is the one that never changes — that's the surprise worth remembering.

Why (n − 2) × 180?

Because every polygon is secretly a fan of triangles.

The formula isn't a rule someone invented to torture you — it falls right out of the one shape whose angles you already trust. The angles in any triangle add to 180°. That's the seed. Everything else grows from it.

Here's the trick. Pick one corner of your polygon and draw straight lines (called diagonals) from it to every other corner you can reach. The whole shape splits into triangles — and you always get exactly n − 2 of them. A pentagon (n = 5) gives 3 triangles. A hexagon (n = 6) gives 4. Since each triangle carries 180°, the polygon's interior angles must add to (n − 2) × 180°. Tap the button to draw the diagonals one at a time and count along.

draw diagonals from one corner
6

Triangles so far: 1  ·  goal is 4  ·  4 × 180° = 720°

Every triangle you peel off adds 180°. Count the triangles, multiply by 180 — that's the whole proof.

Why n − 2 and not n?The two sides that touch your chosen corner can't become diagonals — there's nothing new to connect them to. So out of n corners, you "use up" 2 right next to you, and the triangles span the rest. That missing 2 is exactly the −2 in the formula.

One angle at a time

In a regular polygon, just share the total out.

The formula gives you all the inside angles added together. But what's one corner worth? If the polygon is regular, every corner is identical — so you simply split the total evenly between the n corners. That's a single divide:

one interior angle = (n − 2) × 180° ÷ n

Slide n up and watch one corner widen. Something quietly beautiful happens at the top end: the more sides you add, the closer each angle creeps to 180° — a straight line — because a many-sided regular polygon is basically a circle wearing a lot of tiny corners. A triangle's corner is a sharp, narrow 60°. A square's is a tidy right angle, 90°. By the time you reach a dodecagon (12 sides), each corner has fanned open to 150°, almost flat. Push toward a hundred sides and you'd barely be able to tell it from a circle at all.

This one divide is worth keeping in your pocket — it's the single most common polygon question on a test. "What is each interior angle of a regular octagon?" is just (8 − 2) × 180° ÷ 8 = 135°. No memorising a table; you rebuild the answer every time from the two things you already know.

one corner, lit up
8
Shape
octagon
Each interior angle
135°
Heading toward
180°

(8 − 2) × 180° ÷ 8 = 135°

A triangle's corner is a narrow 60°. By a dodecagon it's a wide 150°, leaning toward flat.

The outside · the 360° lap

Walk around the edge — you turn exactly one full circle.

An exterior angle is the amount you turn at a corner if you walk around the polygon's edge like it's a running track. Each time you reach a vertex, you swivel a little to follow the next side. The exterior angle is the size of that swivel.

Now the magic: take a full lap and add up every turn you made. You always end up facing the exact direction you started — which means your turns must total one complete rotation: 360°. It's true for a triangle and it's true for a 100-sided shape. Press play and watch the turn-meter fill to a full circle, one corner at a time.

Picture driving a go-kart around a track shaped like your polygon. To get all the way around and point the kart back the way it came, your steering wheel has to add up to exactly one full turn — no more, no less. A triangle makes you take three big, hard swerves (120° each). A twelve-sided track makes you take twelve gentle nudges (30° each). Different driving, same destination: 3 × 120° = 360°, and 12 × 30° = 360°. That's the secret hiding inside the second rule — it's not really about angles at all, it's about the fact that you can only ever spin around once on the way back to the start.

press play · take a lap
5
Corners turned
0 / 5
Each turn
72°
Total turned

Each turn is one exterior angle, 360° ÷ n. Finish the lap and they sum to a single full spin.

The corner handshake

At every corner, inside + outside = 180°.

Zoom right into a single vertex and you'll spot a tidy partnership. The interior angle and its exterior angle sit on a straight line — the side you're walking, extended past the corner. And a straight line is 180°. So at every single corner, the two angles are partners that always add to 180°. They're called supplementary: when one grows, the other shrinks by the same amount.

This is the bridge between the two big rules. A wide interior angle means a small turn; a narrow interior angle means a sharp turn. Drag n and watch the two wedges trade space across the straight line — but never break their 180° deal.

one corner, up close
6

120° inside  +  60° outside  =  180°

The pink wedge is the interior angle; the rose wedge is the exterior turn. Together they always fill the straight line.

Worked examples

Two classics, start to finish.

Let's put it together on the two shapes you'll meet most: the pentagon (n = 5) and the hexagon (n = 6). Pick one and watch the four numbers fall out of the same two rules. Nothing memorised — just counting triangles and sharing 360°.

Take the pentagon the slow way first. It has 5 sides, so it splits into 5 − 2 = 3 triangles. Three triangles carry 3 × 180° = 540°, so all five interior angles together make 540°. Since a regular pentagon's corners are all equal, each one is 540° ÷ 5 = 108°. For the outside, you don't even need the formula — the exterior angles always add to 360°, so each turn is 360° ÷ 5 = 72°. And notice the corner handshake holds: 108° + 72° = 180°. Every number checks against every other.

Now the hexagon, quick this time: 6 sides → 6 − 2 = 4 triangles → 4 × 180° = 720° inside → 720° ÷ 6 = 120° per corner; exterior 360° ÷ 6 = 60° per turn; and again 120° + 60° = 180°. The 120° corner is exactly why bees build in hexagons and why so many tiles are six-sided — but that's the next section.

hexagon
Triangles (n−2)
4
Interior sum
720°
Each interior
120°
Each exterior
60°

(6 − 2) × 180° = 720°, shared 6 ways = 120° each

Exterior sum? Don't even calculate it — it's 360°, like always.

Where this shows up

Which shapes tile a floor with no gaps?

This is why your bathroom floor is squares or hexagons and almost never pentagons. For copies of one regular polygon to tessellate — fit snugly around a point with no gaps and no overlaps — their interior angles meeting there must add to exactly 360° (a full turn around the point). So the question is simply: does that shape's interior angle divide evenly into 360°?

Squares (90° → four fit), triangles (60° → six fit), and hexagons (120° → three fit) all hit 360° on the nose. Pentagons can't: 108° goes into 360° three times with 36° left over — an annoying gap. Pick a shape and try to close the circle.

This is the deep reason honeybees build hexagonal cells: hexagons tile a wall with zero wasted space, and of the three shapes that tile, they wrap the most area inside the least amount of wax. It's also why a classic soccer ball mixes pentagons with hexagons — the pentagons force the flat sheet to curve into a ball, precisely because they refuse to lie flat. A pattern that won't tessellate isn't a failure; sometimes it's exactly the tool you need to bend a surface into a sphere.

do the copies close the circle?

Triangle: 60° each — six fit perfectly. 6 × 60° = 360°. No gap!

If the interior angle divides 360° exactly, the shape tiles. If it leaves a remainder, you get a gap.

Don't fall for this

"More sides means a bigger exterior total." Nope.

It feels like it should be true. More corners, more turns — surely a bigger total? But that's mixing up the two rules. The interior sum really does grow with every side. The exterior sum does not. Add a side and each individual turn just gets a little smaller, so they always re-balance back to a single 360° lap.

Watch the two bars race as you add sides. The interior bar keeps stretching. The exterior bar sits perfectly still at 360° — because you can only ever spin around once.

The trap

"A 12-sided shape turns way more than a triangle, so its exterior angles must add to more than 360°."

The truth

Both take you around once. The 12-gon just makes 12 gentle turns instead of 3 sharp ones — same 360° total.

3
Interior sum (grows)180°
Exterior sum (locked)360°

Drag from 3 to 12: one bar climbs forever, the other never moves.

Carry this with you

Two rules, both unbreakable.

1

Inside grows

Interior angles add to (n − 2) × 180° — one triangle's 180° for each slice.

2

Outside is fixed

Exterior angles always add to 360° — one full lap, no matter the sides.

3

Each corner pairs up

Interior + exterior = 180°, because they sit on a straight line.