Polygon angle calculator: interior and exterior angles

Sum of interior angles, each interior and exterior angle of a regular polygon and the number of diagonals, from the number of sides or one angle.

Drafted with AI writing toolsUpdated Checked examples: 8

Try
Sum of interior angles
°
Sum of interior angles: 540 °
Maximum decimal places: 4; Nearest, ties away from zero
Each interior angle (regular polygon)
108°
Each exterior angle (regular polygon)
72°
Sum of exterior angles
360°
Central angle (regular polygon)
72°
Number of diagonals
5
Triangles from one vertex
3
Sum of interior angles in radians
9.42477796rad
Name
Pentagon

A Pentagon (5 sides) has interior angles adding to 540°; when regular, each is 108° and each exterior angle is 72°. It has 5 diagonals.

Regular Pentagon with diagonals from one vertex

108°72°
How it's calculated S
  1. Sum of interior angles

    S=(n−2)×180∘=3×180∘=540∘S = (n - 2) \times 180^\circ = 3 \times 180^\circ = 540^\circ

    A 5-sided convex polygon splits into 3 triangles from one vertex.

  2. Each angle of the regular polygon

    Sn=540∘5=108∘,360∘n=72∘\frac{S}{n} = \frac{540^\circ}{5} = 108^\circ,\qquad \frac{360^\circ}{n} = 72^\circ
  3. Diagonals

    n(n−3)2=5×22=5\frac{n(n - 3)}{2} = \frac{5 \times 2}{2} = 5

About the polygon angle calculator

A simple polygon with n sides can be split into n − 2 triangles, so its interior angles add up to (n − 2) × 180°. In a regular polygon all the angles are equal: each interior angle is (n − 2) × 180°/n and each exterior angle 360°/n, because the exterior angles of a convex polygon make one full turn. The number of diagonals is n(n − 3)/2.

The default pentagon has interior angles adding up to 540°, or 108° each when regular, with 72° exterior angles and 5 diagonals. Working backwards is common in tiling and woodwork: an interior angle of 140° means 360/(180 − 140) = 9 sides, and each joint of a regular n-sided frame is mitred at 180°/n, 36° for a pentagon.

An angle that fits no whole number of sides, such as 100°, is rejected with the nearest valid polygon. A rounded entry is accepted when it matches an exact angle: 128.57° is read as the heptagon's 900/7°.

Sum of the interior angles of a polygon

The interior angles of any simple polygon with n sides add up to (n − 2) × 180°, which follows from the triangle angle sum in Euclid, Elements I.32. A hexagon's total is 4 × 180° = 720°, so each angle of a regular hexagon is 120°. The total applies to irregular polygons too; the equal share only to regular ones.

Why the sum is (n − 2) × 180°

Diagonals drawn from one corner of a convex polygon cut it into n − 2 triangles, and each triangle's angles add to 180°. A pentagon splits into 3 triangles, so its angles total 540°.

Any simple polygon, convex or concave, can be cut into n − 2 triangles, so the rule applies whenever the sides do not cross. In radians the sum is (n − 2)π, which is 10π ≈ 31.4159 rad for a 12-sided dodecagon.

Interior and exterior angles of a regular polygon

In a regular polygon every side and every angle is equal:

  • Each interior angle: (n − 2) × 180°/n, the same as 180° − 360°/n.
  • Each exterior angle: 360°/n. Walking once around a convex polygon turns you through one full turn, so its exterior angles add to 360°.
  • Central angle: 360°/n, equal to the exterior angle.

An interior angle and the exterior angle beside it always add to 180° because they lie along one straight line.

SidesInterior-angle sumEach interior angleEach exterior angleDiagonals
3180°60°120°0
4360°90°90°2
5540°108°72°5
6720°120°60°9
81080°135°45°20
121800°150°30°54

As n grows the interior angle approaches 180°: a 1,000-sided polygon has angles of 179.64°.

Number of sides from an interior or exterior angle

Divide 360° by the exterior angle: n = 360° ÷ (180° − interior angle). An interior angle of 140° gives 360 ÷ 40 = 9 sides, a nonagon with 1,260° of angles in total.

Starting from an exterior angle of 24° gives 360 ÷ 24 = 15 sides, each with a 156° interior angle.

When n is not a whole number, no regular polygon has that angle. An interior angle of 100° gives 360 ÷ 80 = 4.5 sides; the nearest regular polygon, the pentagon, has 108°.

Some regular angles repeat forever as decimals. A heptagon's interior angle is 900/7 ≈ 128.5714°, so a rounded 128.57° still identifies 7 sides.

How many diagonals a polygon has

A polygon with n vertices has n(n − 3)/2 diagonals. Each vertex connects to all the others except itself and its two neighbors, n − 3 in all; dividing by 2 stops each diagonal being counted twice. An octagon has 8 × 5 ÷ 2 = 20.

Miter angles for polygon frames

To build a regular frame, planter or gazebo from straight pieces, cut both ends of each piece at 180°/n from square. That is 36° for a pentagon, 30° for a hexagon and 22.5° for an octagon. Two such cuts meet at the polygon's interior angle.

Common mistakes

  • Sharing the sum equally in an irregular polygon. An irregular pentagon's angles still total 540°, but each one need not be 108°.
  • Swapping interior and exterior angles. A regular hexagon has 120° interior and 60° exterior angles; they add to 180°.
  • Using the 360° exterior sum on a concave shape. At a reflex corner the boundary turns the other way, so that turn counts as negative.

What the calculation starts from

  • Number of sides: a whole number from 3 to 100,000.
  • One interior or exterior angle of a regular polygon, in degrees, radians, gradians or turns.
  • A rounded angle is accepted when it matches a regular polygon's exact angle to the decimals typed, with a note saying so.

For the area of a regular polygon from its side length, use the area and perimeter calculator. For an irregular outline, use polygon area from coordinates.

Worked examples

Triangle (edge case: no diagonals)

I know the
Number of sides
Number of sides
3
Sum of interior angles
180 °
Each interior angle (regular polygon)
60 °
Each exterior angle (regular polygon)
120 °
Number of diagonals
0
Triangles from one vertex
1
Name
Triangle

Checked against: Angle sum of a triangle (Euclid I.32); a triangle has no diagonals

Pentagon

I know the
Number of sides
Number of sides
5
Sum of interior angles
540 °
Each interior angle (regular polygon)
108 °
Each exterior angle (regular polygon)
72 °
Number of diagonals
5

Checked against: 3 × 180; 540/5; 360/5; 5·2/2

Heptagon (repeating decimal)

I know the
Number of sides
Number of sides
7
Sum of interior angles
900 °
Each interior angle (regular polygon)
128.57142857 °
Each exterior angle (regular polygon)
51.42857143 °
Number of diagonals
14

Checked against: 900/7, 360/7; 7·4/2

Dodecagon

I know the
Number of sides
Number of sides
12
Sum of interior angles
1,800 °
Each interior angle (regular polygon)
150 °
Number of diagonals
54
Name
Dodecagon
Sum of interior angles in radians
31.41592654 rad

Checked against: 10 × 180; 1800/12; 12·9/2

Questions

What is the sum of the interior angles of a polygon?

(n − 2) × 180°, where n is the number of sides. A triangle has 180°, a quadrilateral 360°, a pentagon 540°, a hexagon 720° and an octagon 1,080°. The rule holds for any simple polygon, regular or not, because it can be triangulated into n − 2 triangles of 180° each.

How do you find each interior angle of a regular polygon?

Divide the angle sum by the number of sides: (n − 2) × 180°/n, which is the same as 180° − 360°/n. A regular hexagon has 120° angles, an octagon 135° and a dodecagon 150°. The angle approaches 180° as n grows; a 1,000-sided polygon has angles of 179.64°.

How do you find the number of sides from an interior angle?

Subtract the angle from 180° to get the exterior angle, then divide 360° by it: n = 360°/(180° − interior angle). An interior angle of 140° gives 360/40 = 9 sides, a nonagon. If the result is not a whole number, no regular polygon has that angle: 100° gives 4.5.

What do the exterior angles of a polygon add up to?

360° for any convex polygon, whatever the number of sides. Walking once around the boundary, you turn through each exterior angle and finish facing your starting direction, which is one full turn. In a regular polygon each exterior angle is 360°/n: 72° for a pentagon, 60° for a hexagon and 45° for an octagon.

How many diagonals does a polygon have?

n(n − 3)/2. Each of the n vertices joins n − 3 others by a diagonal (not itself and not its two neighbours), and every diagonal is counted from both ends, hence the division by 2. A pentagon has 5 diagonals, a hexagon 9, an octagon 20 and a dodecagon 54; a triangle has none.

About this calculator

S=(n−2)×180∘,interior=(n−2)×180∘n,exterior=360∘n,diagonals=n(n−3)2S = (n - 2) \times 180^\circ,\quad \text{interior} = \frac{(n - 2) \times 180^\circ}{n},\quad \text{exterior} = \frac{360^\circ}{n},\quad \text{diagonals} = \frac{n(n - 3)}{2}

Sources

  1. Weisstein, E. W. “Polygon”, “Regular Polygon”, “Polygon Diagonal” — MathWorld
  2. Euclid, Elements, Book I, Proposition 32 (angle sum of a triangle, extended to polygons by triangulation)

Checked against references

This calculator includes 8 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.