About the polygon angle calculator
From one vertex, a polygon with n sides splits 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°.
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 diagonals from one vertex split it 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.
How accurate is the polygon angle calculator?
Accuracy depends on your inputs and the method's assumptions. Decimal arithmetic uses 50 significant digits, but estimates, numerical methods and source data can be less precise; the displayed rounding does not remove those limits. It is checked against 8 worked examples whose answers come from independent sources; for example, “Triangle (edge case: no diagonals)” is checked against Angle sum of a triangle (Euclid I.32); a triangle has no diagonals.
Where does the method come from?
Weisstein, E. W. “Polygon”, “Regular Polygon”, “Polygon Diagonal” — MathWorld; Euclid, Elements, Book I, Proposition 32 (angle sum of a triangle, extended to polygons by triangulation).