Understanding the regular polygon calculator — concept and principle
A regular polygon has all sides equal and all interior angles equal: the equilateral triangle, the square, the regular pentagon, the hexagon and so on. Knowing just the number of sides n and the side length s fixes the whole shape, so this calculator returns the area, perimeter, interior angle, apothem (centre-to-side distance), circumradius (centre-to-vertex distance) and number of diagonals. It is used for tiles, bolt heads, gazebos and signs.
How it is calculated
- Perimeter: P = ns
- Interior angle: (n − 2) × 180° ÷ n
- Apothem: a = s ÷ (2 tan(π/n))
- Circumradius: R = s ÷ (2 sin(π/n))
- Area: A = ns² ÷ (4 tan(π/n)) = ½ × P × a
- Diagonals: n(n − 3) ÷ 2
Lengths share the unit of s; the area is in that unit squared.
The principle
Join the centre to every vertex and the polygon splits into n identical isosceles triangles, each with base s and apex angle 2π/n. Cutting one in half gives a right triangle with half-angle π/n, opposite side s/2, adjacent side the apothem and hypotenuse the circumradius. So tan(π/n) = (s/2)/a and sin(π/n) = (s/2)/R, which give the two radius formulas. Each small triangle has area ½ × s × a, and there are n of them, so the area is ½ × ns × a. The interior angle sum (n − 2) × 180° comes from splitting the polygon into n − 2 triangles from one vertex. Each vertex can connect to n − 3 non-adjacent vertices, and each diagonal is counted twice, hence n(n − 3)/2.
Worked example
- Inputs: n = 6 (hexagon), s = 4; π/6 = 30°.
- Perimeter: 6 × 4 = 24.
- Interior angle: 4 × 180 ÷ 6 = 120°.
- Apothem: 4 ÷ (2 tan 30°) = 4 ÷ 1.154701 ≈ 3.464101615 (that is 2√3).
- Circumradius: 4 ÷ (2 sin 30°) = 4 ÷ 1 = 4.
- Area: ½ × 24 × 3.464102 ≈ 41.56921938 (24√3); diagonals: 6 × 3 ÷ 2 = 9.
| Number of sides | Area |
|---|---|
| 1.5 | -3.464101615 |
| 3 | 6.92820323 |
| 4.5 | 21.45156467 |
| 6 | 41.56921938 |
| 7.5 | 67.38110322 |
| 9 | 98.9091871 |
| 12 | 179.1384388 |
How to read the result
For a hexagon the circumradius equals the side, because the six central triangles are equilateral. As n grows, the polygon approaches a circle: the apothem and circumradius get closer together and the area approaches πR². Only triangles, squares and hexagons tile a flat floor on their own, since only 60°, 90° and 120° divide 360° exactly.
Common mistakes
- Entering the distance across the flats or across the corners instead of the side length. Across flats is 2a, across corners is 2R.
- Using degrees inside tan or sin when your calculator expects radians.
- Applying these formulas to irregular polygons; they hold only when all sides and angles are equal.
Frequently asked questions
What is the sum of the interior angles of a polygon?
(n − 2) × 180°, whether or not the polygon is regular. A pentagon’s angles sum to 540°.
What is the exterior angle of a regular polygon?
360° ÷ n. It always equals 180° minus the interior angle; for a hexagon, 60°.
How do I get the side length from the circumradius?
s = 2R sin(π/n). A pentagon inscribed in a circle of radius 10 has s ≈ 11.76.
Sources: Euclid, Elements, Book IV (inscribing and circumscribing regular polygons) · H. S. M. Coxeter, Regular Polytopes, Dover