Audited 29 Jul 2026·Last updated 28 Oct 2026·4 citations·Tier 2·0 uses

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

A whole number from 3 to 1000. 3 is an equilateral triangle, 4 a square, 5 a pentagon, 6 a hexagon, 8 an octagon. All sides and all angles are assumed equal — that is what 'regular' means.
Which measurement do you already know?
Any unit you like — millimetres, inches, metres. Lengths come back in the same unit and the area comes back in that unit squared. Must be greater than zero.
Area
259.8076
The area enclosed by the polygon, in the square of your unit: ¼ × n × side² × cot(π ÷ n), the same as half the perimeter times the apothem.
Perimeter
60
Side length
10
Apothem (inradius)
8.6603
Circumradius
10
Across flats (inscribed diameter)
17.3205
Across corners (circumscribed diameter)
20
Interior angle
120°
Exterior angle
60°
Sum of interior angles
720°
Number of diagonals
9

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.

A = ¼ n a² cot(π ⁄ n) , r = ½ a cot(π ⁄ n) , R = ½ a csc(π ⁄ n) , P = n a

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.

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.

number Of Sides6
value10
known Quantityside

Frequently asked questions.

How do I find the side of a hex nut from its spanner size?
The spanner size is the across-flats width. Choose across flats with 6 sides and enter it: the side is that width ÷ √3, so a 19 mm nut has sides of 10.9697 mm and measures 21.9393 mm across its corners — the clearance a socket or a recess around the nut must allow.
What is the difference between the apothem and the circumradius?
The apothem runs from the centre to the middle of a side; the circumradius runs from the centre to a corner, so it is always longer. Their ratio is cos(π ÷ n): 0.5 for a triangle, 0.866 for a hexagon, and ever closer to 1 as sides are added and the shape approaches a circle.
How tall is a pentagon standing on one of its sides?
For an odd number of sides the height is the apothem plus the circumradius, because a corner sits opposite each side. A pentagon with 10-unit sides is 6.8819 + 8.5065 = 15.3884 units tall. The across-flats output, 13.7638, is the inscribed circle's diameter, not this height.
Why do only triangles, squares and hexagons tile a floor on their own?
The tiles meeting at a point must fill exactly 360°, so the interior angle has to divide 360 evenly. Triangles (60°), squares (90°) and hexagons (120°) do, fitting six, four and three around a point. A pentagon's 108° does not, and from seven sides upward the angle exceeds 120°, so fewer than three can meet.
Do the angle sum and the diagonal count need the polygon to be regular?
No. Any simple polygon with n sides, regular or not, has interior angles totalling (n − 2) × 180° and n(n − 3) ÷ 2 diagonals, because both depend only on the number of corners. Regularity is what makes each angle equal and what gives the polygon a single apothem and circumradius.
Can I use this for an irregular shape or a star?
No. An irregular polygon has unequal sides, so it has no single apothem, circumradius or side length; its area needs the corner coordinates, which the irregular polygon area calculator takes. A star polygon such as the pentagram has crossing edges, so its enclosed area follows different rules from the convex shape modelled here.

References& sources.

  1. [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. [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. [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. [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
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
Coming soon