Hexagon from side length
For n = 6 and s = 5 cm: P = 6 × 5 = 30 cm; A = 6 × 5² / [4 tan(π/6)] = 64.9519 cm².
Your measurements stay private: calculations run in your browser.
A regular polygon is a convex two-dimensional figure whose sides and interior angles are all equal. The apothem (or inradius) reaches the midpoint of a side at 90°, while the circumradius reaches a vertex.
| Known | Find side length | Find area |
|---|---|---|
| Side s | s | A = ns² / [4 tan(π/n)] |
| Apothem a | s = 2a tan(π/n) | A = na² tan(π/n) |
| Circumradius R | s = 2R sin(π/n) | A = nR² sin(2π/n) / 2 |
| Perimeter P | s = P/n | A = P² / [4n tan(π/n)] |
| Area A | s = √[4A tan(π/n)/n] | A |
| Perimeter and apothem | s = P/n | A = Pa/2 |
All length inputs must use the same unit. Perimeter, side, apothem, and radius use that unit; polygon and circle areas use the squared unit. The calculator keeps full JavaScript floating-point precision internally, then rounds only for display.
Both start at the center, but the apothem ends at the midpoint of a side and the circumradius ends at a vertex. For a regular n-gon, a = R cos(π/n), so R is always at least as large as a.
The selected input is first converted to a side length. From that coherent value set, the calculator derives P = ns, a = s/[2 tan(π/n)], and R = s/[2 sin(π/n)]. Perimeter-plus-apothem mode uses the direct measured-area identity A = Pa/2.
For n = 6 and s = 5 cm: P = 6 × 5 = 30 cm; A = 6 × 5² / [4 tan(π/6)] = 64.9519 cm².
For n = 5 and a = 4 m: s = 2 × 4 × tan(π/5) = 5.8123 m; A = 5 × 4² × tan(π/5) = 58.1234 m².
For n = 8 and R = 10 mm: s = 2 × 10 × sin(π/8) = 7.6537 mm; A = 8 × 10² × sin(π/4)/2 = 282.8427 mm².
| Polygon | Sides | Interior angle | Exterior angle | Diagonals |
|---|---|---|---|---|
| Equilateral triangle | 3 | 60° | 120° | 0 |
| Square | 4 | 90° | 90° | 2 |
| Pentagon | 5 | 108° | 72° | 5 |
| Hexagon | 6 | 120° | 60° | 9 |
| Octagon | 8 | 135° | 45° | 20 |
| Decagon | 10 | 144° | 36° | 35 |
| Dodecagon | 12 | 150° | 30° | 54 |
Author and calculation reviewer: Starlight Tools Mathematics Editorial Team
Last reviewed: 17 July 2026
Accuracy note: These formulas assume a convex regular polygon. Use consistent units. Displayed rounding may differ from the unrounded internal calculation, especially for very large or very small inputs.
References: OpenStax, Contemporary Mathematics 10.6: Area; Wolfram MathWorld: Regular Polygon; Carnegie Mellon University: formulas for angles of regular polygons.
A regular polygon is convex and has equal side lengths and equal interior angles. Its vertices lie on one circumcircle, and every side is tangent to one incircle.
For n sides, use A = ns²/[4 tan(π/n)] from side s, A = na² tan(π/n) from apothem a, A = Pa/2 from perimeter P and apothem a, or A = nR² sin(2π/n)/2 from circumradius R.
The apothem, or inradius, runs from the center perpendicular to a side. The circumradius runs from the center to a vertex, so it is longer. They satisfy a = R cos(π/n).
A polygon with n sides has n(n − 3)/2 diagonals. For example, a regular hexagon has 6(6 − 3)/2 = 9 diagonals.
Yes. A polygon must have a whole number of sides, and a convex polygon needs at least 3. This calculator accepts integers from 3 through 10,000.
Use one consistent length unit. Length results keep that unit and areas use its square. Calculations use full browser precision; Auto, decimal-place, significant-figure, and scientific display options only change the shown rounding.
No. The calculations and diagram run locally in your browser; measurement values are not uploaded by this calculator.