Regular Polygon Calculator: How to Find Area, Apothem, and Angles of Any N-Gon
About the Author

A regular polygon calculator needs exactly two facts to rebuild an entire shape: how many sides it has, and one length. Any length. Hand it a side, an apothem, a perimeter, or nothing but the area, and every other property drops out of the same pair of ratios — sin(180°/n) and tan(180°/n). That is what regularity buys you. Equal sides, equal angles, one circle through every corner and a second circle kissing every edge, so a single number sets the scale and n does the rest. What follows is the map: which formula to reach for depending on what you actually measured, a coefficient table for the polygons that turn up in real work, two examples worked in millimetres and metres, and the mix-up that wrecks more n-gon answers than every other error combined.
The Apothem and the Circumradius Are Not the Same Line
Two different distances run from the centre of a regular polygon outward, and they get swapped constantly. The apothem (a) goes from the centre perpendicular to the middle of a side — it is the radius of the inscribed circle. The circumradius (R) goes from the centre to a corner — the radius of the circle through all the vertices. They are linked by one clean relation:
a = R · cos(180°/n)
R = a / cos(180°/n)
Because the area formula A = ½ · P · a demands the apothem specifically, feeding it R instead inflates the answer by exactly the factor R/a. The cost is not uniform — it collapses as n grows, which is why the mistake often survives on an octagon and gets caught instantly on a triangle:
| Sides n | a / R | R / a | Area error if swapped |
|---|---|---|---|
| 3 | 0.5000 | 2.0000 | +100% |
| 4 | 0.7071 | 1.4142 | +41.4% |
| 5 | 0.8090 | 1.2361 | +23.6% |
| 6 | 0.8660 | 1.1547 | +15.5% |
| 8 | 0.9239 | 1.0824 | +8.2% |
| 12 | 0.9659 | 1.0353 | +3.5% |
| 20 | 0.9877 | 1.0125 | +1.2% |
Machinists solved this naming problem long ago. A hex key or bolt head is specified across the flats, which is 2a, while across the corners is 2R. A 13 mm nut measures 13 mm flat to flat and 15.01 mm point to point, because 13 ÷ cos 30° = 15.01. Order a socket by the wrong one and it either will not go on or will round the head off.
Feed a Regular Polygon Calculator Whatever You Actually Measured
Textbooks present the side length as the starting point, but in practice you rarely have it. You have a fence line, a caliper reading across the flats, or a plot area from a survey. The trick is to convert whatever you hold into s first, then run one chain of formulas. Write θ = 180°/n once and the whole table falls into place:
| What you know | Convert to side length | Typical source |
|---|---|---|
| Perimeter P | s = P / n | Fencing or edging length |
| Apothem a | s = 2a · tan θ | Half the across-flats reading |
| Circumradius R | s = 2R · sin θ | Bolt-circle or lathe stock radius |
| Area A | s = √(4A · tan θ / n) | Survey plan or design brief |
From s onward there is only one route, and it is short. The perimeter is P = n · s. The apothem is a = s / (2 tan θ) and the circumradius is R = s / (2 sin θ). The area is A = ½ · P · a, which expands to the form most people memorise: A = (n/4) · s² · cot θ. Every one of those is just the same right triangle — half a side, an apothem, and a circumradius — repeated 2n times around the centre. Slice the polygon into n identical isosceles triangles and each contributes ½ · s · a; multiply by n and you have the area. That is the entire derivation.
Area Coefficients Worth Memorising
Since cot θ depends only on n, the area of any regular polygon is a fixed multiple of s². Keep this table near your bench and you can do most polygon work in your head, or at least sanity-check a calculator before you cut anything:
| n | Name | Interior angle | k (area ÷ s²) | Diagonals | Fills circle |
|---|---|---|---|---|---|
| 3 | Triangle | 60° | 0.4330 | 0 | 41.3% |
| 4 | Square | 90° | 1.0000 | 2 | 63.7% |
| 5 | Pentagon | 108° | 1.7205 | 5 | 75.7% |
| 6 | Hexagon | 120° | 2.5981 | 9 | 82.7% |
| 7 | Heptagon | 128.571° | 3.6339 | 14 | 87.1% |
| 8 | Octagon | 135° | 4.8284 | 20 | 90.0% |
| 10 | Decagon | 144° | 7.6942 | 35 | 93.5% |
| 12 | Dodecagon | 150° | 11.1962 | 54 | 95.5% |
Two entries earn special attention. The square’s coefficient is exactly 1, which is the definition of s² and a useful anchor. And k = 0.4330 for the triangle is √3/4 — the same constant an equilateral triangle calculator uses, because a regular 3-gon is exactly that.
Worked Example: A Hex Paver Measured Across the Flats
A hexagonal paving stone reads 200 mm across the flats on a tape. That number is 2a, not a side and not a diameter, so a = 100 mm. With n = 6, θ = 30°:
s = 2a · tan 30° = 200 × 0.57735 = 115.47 mm
P = 6 × 115.47 = 692.82 mm
A = ½ × 692.82 × 100 = 34,641 mm² = 346.41 cm²
R = s / (2 sin 30°) = 115.47 / 1 = 115.47 mm → 230.94 mm across the corners
Cross-check with the coefficient table: 2.5981 × 115.47² = 2.5981 × 13,333 = 34,641 mm². The two routes agree, which is the point of keeping both. Now the practical bit — a 10 m² patio is 10,000,000 mm², so 10,000,000 ÷ 34,641 = 288.7, call it 289 stones. Hexagons tile the plane with zero gaps, so that figure only grows for the part-stones you cut along the border. Notice too that R = s exactly when n = 6. A hexagon is the only regular polygon whose circumradius equals its side, which is why a compass set to one radius steps around its own circle in precisely six hops.
Running It Backwards: Pentagon From an Area Target
A landscape brief calls for a regular pentagon bed of 12 m². Here the area is the input and the geometry is the unknown, so use the inverse form with n = 5 and θ = 36°, where tan 36° = 0.72654:
s = √(4 × 12 × 0.72654 / 5) = √6.9748 = 2.641 m
P = 5 × 2.641 = 13.205 m of edging
a = 2.641 / (2 × 0.72654) = 1.8175 m
R = 2.641 / (2 × 0.58779) = 2.2466 m
So the bed needs 13.21 m of edging and clears a circle 4.49 m across. That last number is the one that gets forgotten on site: a 12 m² pentagon does not fit in a 4 m gap, even though a 12 m² circle would need only 3.91 m. Comparing against the area of a circle before you set stakes takes ten seconds and saves a redesign.
Interior, Exterior, Central: Three Angles, One Divisor
Every angle in a regular polygon comes from dividing 360 by n. Walk the perimeter once and you turn through a full circle, so each corner turns you by the exterior angle 360°/n; the interior angle is whatever is left of the straight line, 180° − 360°/n = (n − 2)·180°/n. The central angle subtended by one side at the centre is also 360°/n — the same number as the exterior angle, which surprises people until they notice both count “one side’s worth” of a full turn. Total interior angle sum is (n − 2) × 180°, because any n-gon splits into n − 2 triangles from a single vertex.
One consequence is worth spelling out: only three regular polygons tile a floor on their own. Copies meeting at a point must have interior angles that divide 360° exactly, and only 60° (triangle), 90° (square) and 120° (hexagon) do. A pentagon’s 108° gets you three tiles and a 36° wedge of daylight, which is why you have never seen a regular pentagonal bathroom floor. If you are chasing an unknown angle in an irregular shape instead, the missing angle calculator handles that case, and a general geometry calculator covers the mixed-shape problems.
Counting the Diagonals, Then Measuring Them
Each vertex joins to n − 3 others by a diagonal — every vertex except itself and its two neighbours, which are sides. That counts each diagonal twice, so the total is n(n − 3)/2. An octagon has 8 × 5 ÷ 2 = 20. A dodecagon jumps to 54. Length is the more useful question though, and there is one formula for all of them. Vertices k steps apart sit a distance
d(k) = 2R · sin(k · 180°/n)
apart, with k = 1 giving the side itself and k running up to ⌊n/2⌋. For a hexagon that means the short diagonal is √3 · s ≈ 1.732s and the long one is exactly 2s. For an octagon the three distinct diagonals are 1.8478s, 2.4142s (that is 1 + √2) and 2.6131s. The pentagon produces the famous one: d/s = sin 72° / sin 36° = 1.618034, the golden ratio, which is why pentagon and pentagram constructions are full of φ. If a diagonal is all you need, and the polygon in question is a rectangle rather than an n-gon, the diagonal calculator is the faster tool.
How Fast Does an N-Gon Turn Into a Circle?
Push n upward and the polygon squeezes against its circumcircle. The fraction of the circle it fills is (n/2π)·sin(360°/n), and the shortfall shrinks as roughly 2π²/(3n²) — meaning the gap falls by a factor of four every time you double the number of sides. A hexagon covers 82.7% of its circle, a dodecagon 95.5%, a 24-gon 98.9%, and a 96-gon 99.93%. That last figure is not a random pick. Archimedes squeezed π between inscribed and circumscribed 96-gons around 250 BC and got 223/71 < π < 22/7, or 3.1408 to 3.1429 — a bound good to three digits, produced entirely with the perimeter formula P = n · s.
The practical version of the same fact: if you cut a “round” table top as a 24-sided polygon on a CNC router, you lose about 1.1% of the area of a true circle and nobody will spot the flats from two metres away. Below roughly 20 sides the faceting becomes visible, and below 12 it reads as a deliberate design choice.
Where N-Gon Answers Go Wrong
- Degrees typed into a radian calculator. tan(180/n) needs degree mode; a calculator in radians reads tan(30) as tan(30 radians) = −6.4053 and hands back a negative area. A negative or wildly oversized result almost always means mode, not arithmetic. In radians the formula is tan(π/n) — check the tangent value on its own if a result looks impossible.
- Across-flats read as a side length. On a hexagon the flats reading is 2a = √3 · s ≈ 1.732s, so entering a 200 mm flats measurement as the side triples the area — 200² against the true 115.47². Anything measured with calipers on a nut, tube, or bar is across flats or across corners, never a side.
- Regular formulas applied to an irregular shape. A = ½Pa only works when one apothem serves every side. A field with five unequal edges has no apothem at all — split it into triangles and use Heron’s formula on each piece instead.
- Rounding the coefficient too early. Truncating cot 15° from 3.73205 to 3.73 sounds harmless, but on a 12-sided reservoir with 40 m sides it moves the area from 17,913.9 m² to 17,904 m² — about ten square metres of liner. Round once, at the end, not in the middle of the chain.
- Assuming the shape is convex. A pentagram is drawn on five vertices but is a star polygon, so n(n − 3)/2 and A = ½Pa describe a different figure entirely.
Every one of those is a bookkeeping failure rather than a mathematical one, which is exactly what a calculator is for. Set n, name the measurement you actually hold, and read the diagram to confirm the line you typed is the line you meant.



