Regular Polygon Calculator
Solve any regular polygon from 3 to 1,000 sides from one measurement: area, perimeter, side, apothem, circumradius, across flats and corners, angles, diagonals.
Regular Polygon Calculator
Background.
Fix the number of sides and a regular polygon has exactly one size left to choose. Every side is equal and every angle is equal, so a single measurement — a side, the distance across the flats, the radius to a corner, even the area — settles all the rest. That matters because the dimension you can actually measure is rarely the side length. A spanner reads a hex nut across its flats. A tabletop cut as an octagon has to fit inside a round blank, which is its circumradius. A paving bed starts from the area you want to cover.
So you choose which measurement you have, enter it with the number of sides, and get eleven properties back: area, perimeter, side, apothem, circumradius, the across-flats and across-corners widths, the interior and exterior angles, the sum of the interior angles and the number of diagonals. Lengths come back in whatever unit you entered and the area in that unit squared; angles are always in degrees.
Two pieces of geometry sit behind the numbers. The lengths and area come from trigonometry on a single right triangle inside the polygon, following the relations Wolfram MathWorld gives for a regular polygon. The angles need no trigonometry at all: they follow from Euclid's proof that a triangle's angles add up to two right angles. The diagonal count is pure counting.
As the side count grows, a regular polygon closes in on its circumscribed circle. At 100 sides its area falls short of that circle by 0.066%; at 1,000, the largest count accepted, by 0.00066%. Past that point a circle calculator is the more sensible tool. Irregular shapes and star polygons are outside the method — an irregular polygon has no single apothem or circumradius, and a star's edges cross.
What is regular polygon calculator?
A regular polygon is a flat shape with n straight sides of equal length meeting at n equal angles: the equilateral triangle, the square, the regular pentagon, hexagon, octagon and so on. Two circles belong to every one of them. The inscribed circle touches the midpoint of each side; its radius is the apothem, or inradius. The circumscribed circle passes through every corner; its radius is the circumradius. Twice the apothem is the across-flats width and twice the circumradius the across-corners width — real caliper measurements when n is even, but for an odd n there are no opposite parallel sides, so they are simply the diameters of those two circles.
How to use this calculator.
- Enter the number of sides, a whole number from 3 to 1,000: 5 for a pentagon, 6 for a hexagon, 8 for an octagon, 12 for a dodecagon.
- Choose the measurement you already have. For nuts, bolt heads and hex bar stock that is usually across flats; for a shape that must fit a circle, the circumradius or across corners; for a layout from a plan, the side, area or perimeter.
- Enter its value in any unit, greater than zero. The other lengths come back in the same unit and the area in that unit squared.
- Check the result with half the perimeter times the apothem, which always equals the area. For an odd number of sides, remember that the across-flats figure is the inscribed circle's diameter, not the shape's height.
The formula.
Join the centre of a regular n-gon to two neighbouring corners and bisect the triangle formed. The result is a right triangle with an angle of π ÷ n at the centre, half a side (a ÷ 2) opposite it, the apothem r beside it and the circumradius R as its hypotenuse. Hence tan(π ÷ n) = (a ÷ 2) ÷ r and sin(π ÷ n) = (a ÷ 2) ÷ R, giving r = ½a·cot(π ÷ n) and R = ½a·csc(π ÷ n). The polygon is n triangles of base a and height r, so A = ½ × perimeter × apothem = ¼na²·cot(π ÷ n). Whatever you enter is first turned into a side: a = 2r·tan(π ÷ n) from the apothem, 2R·sin(π ÷ n) from the circumradius, AF·tan(π ÷ n) from across flats, AC·sin(π ÷ n) from across corners, √(4A·tan(π ÷ n) ÷ n) from the area and P ÷ n from the perimeter. Angles are computed separately. Drawing every diagonal from one corner splits the shape into n − 2 triangles, each worth 180° by Euclid's Elements I.32, so the interior angles total (n − 2) × 180°; each is that ÷ n, and each exterior angle is 360° ÷ n. Every corner connects by a diagonal to n − 3 others, and each diagonal has two ends, so there are n(n − 3) ÷ 2 diagonals.
A worked example.
A hexagonal planter is to be built with 10-inch sides. With 6 sides, side length selected and 10 entered, the half-angle at the centre is π ÷ 6 = 30°. The apothem is 10 ÷ (2 × tan 30°) = 10 ÷ 1.1547 = 8.6603 inches, and the circumradius is 10 ÷ (2 × sin 30°) = 10 ÷ 1 = 10 inches — the same as the side, because a regular hexagon is six equilateral triangles. The perimeter is 6 × 10 = 60 inches, so the area is ½ × 60 × 8.6603 = 259.8076 square inches. Across the flats the planter measures 2 × 8.6603 = 17.3205 inches, across the corners 20 inches. Each interior angle is 4 × 180° ÷ 6 = 120°, each exterior angle 60°, the interior angles sum to 720°, and there are 6 × 3 ÷ 2 = 9 diagonals. In practice the frame needs 60 inches of board, six 120° corner joints, and a 20-inch gap if it is to sit corner-first between two walls.
Frequently asked questions.
How do I find the side of a hex nut from its spanner size?
What is the difference between the apothem and the circumradius?
How tall is a pentagon standing on one of its sides?
Why do only triangles, squares and hexagons tile a floor on their own?
Do the angle sum and the diagonal count need the polygon to be regular?
Can I use this for an irregular shape or a star?
References& sources.
- [1]Wolfram Research, MathWorld — 'Regular Polygon' (live revision retrieved 2026-07-29). Equation (3) gives the inradius r = ½a·cot(π/n), Equation (5) the circumradius R = ½a·csc(π/n), and Equation (7) the area A = ¼na²·cot(π/n) for a regular polygon of n sides of length a. All three confirmed on retrieval. Open access.
- [2]Wolfram Research, MathWorld — 'Regular Hexagon' (live revision retrieved 2026-07-29). Gives the n = 6 case in closed form with no trigonometry — area (3√3/2)a², inradius (√3/2)a, circumradius a — which is the independent cross-check used on this page's general formulas, and states that a regular hexagon's properties 'can be computed directly from the formulas for a general regular polygon'. Open access.
- [3]Euclid, Elements, Book I, Proposition 32 — 'In any triangle, if one of the sides is produced, then the exterior angle equals the sum of the two interior and opposite angles, and the sum of the three interior angles of the triangle equals two right angles.' Applied to the n − 2 triangles a polygon divides into, this gives the (n − 2) × 180° interior-angle sum. David E. Joyce web edition of the Heath translation, Clark University; statement confirmed verbatim on retrieval 2026-07-29. Open access.
- [4]Wolfram Research, MathWorld — 'Polygon Diagonal' (retrieved 2026-07-29). Recorded for transparency: this entry does NOT give the total diagonal count. It gives the number of regions the diagonals cut the interior into, C(n,4) + C(n−1,2). Rather than attribute n(n − 3)/2 to a source that does not state it, this page derives that count in full from the counting argument. Open access.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 4 cited below
- Method
- A = ¼ n a² cot(π ⁄ n) , r = ½ a cot(π ⁄ n) , R = ½ a csc(π ⁄ n) , P = n a
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled