Regular Polygon Calculator
Hexagon, octagon, pentagon or any regular n-gon from one size (side, apothem, circumradius, area or perimeter): angles, diagonals, across flats and corners.
Side, apothem, circumradius, perimeter and area, interior, exterior and central angles, the angle sum, the number of diagonals, width across flats and corners, and a drawing.
Example: A hexagon with 10 cm sides has apothem 8.66, circumradius 10, area 259.8 cm² and 120° corners; an octagon 30 across flats (a stop sign) has 12.43 sides; a pentagon of area 100 has side 7.62.
n equal sides,
n equal angles.
How one size gives every other, what the two widths mean, and the angle facts.
From one size to all
A regular n-gon is n identical isosceles triangles meeting at the centre, each with apex angle 360°/n. From the side s: apothem (inradius) a = s ÷ (2 tan(π/n)), circumradius R = s ÷ (2 sin(π/n)), area = ½·n·s·a = ¼·n·s²·cot(π/n), perimeter n·s. Given the apothem, circumradius, area or perimeter instead, the side is recovered by inverting the same formula and everything else follows. Lengths keep the unit you typed; areas are in its square.
Widths
Across flats is the distance between opposite sides — 2a for an even n; for an odd n a side faces a corner, so it is a + R. Across corners is the longest diagonal: 2R for an even n, and for an odd n the chord spanning ⌊n/2⌋ sides, 2R·sin(⌊n/2⌋·π/n). For a hexagon across flats = √3·s and across corners = 2s; for an octagon across flats = (1 + √2)·s ≈ 2.414s — the figure a stop sign or a nut is sized by.
Angles and diagonals
Each interior angle is (n − 2)·180° ÷ n and they sum to (n − 2)·180°; each exterior angle, and the central angle, is 360° ÷ n. There are n(n − 3) ÷ 2 diagonals. The share of the circumscribed circle the polygon fills, area ÷ πR², climbs toward 1 as n grows — 82.7 % for a hexagon, 98.4 % for 20 sides. The drawing is to scale with the apothem and circumradius marked. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.
SOURCES
- Apothem a = s ÷ (2 tan(π/n)), circumradius R = s ÷ (2 sin(π/n)), area = ½·n·s·a, interior angle (n − 2)·180° ÷ n, diagonals n(n − 3) ÷ 2, longest diagonal 2R·sin(⌊n/2⌋π/n)
Last reviewed 22 September 2026. How results are checked: How we verify.