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

Regular Polygon Calculator

Area, perimeter, apothem, circumradius, across flats and angles for any regular polygon. Solve from a side, an apothem, a diameter, the area or the perimeter.

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 enclosed area, ¼ × n × side² × cot(π ÷ n). Equivalently half the perimeter times the apothem, which is the easier form to remember: chop the polygon into n triangles of base 'side' and height 'apothem' and add them up.
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.

The Quanta regular polygon calculator handles every regular polygon from a triangle to a 1000-gon. Tell it how many sides the shape has and give it any single measurement — a side, the apothem, the circumradius, the across-flats distance, the across-corners distance, the area or the perimeter — and it returns all eleven standard properties: area, perimeter, side length, apothem, circumradius, both across-diameters, the interior and exterior angles, the sum of the interior angles, and the number of diagonals. With the default hexagon of side 10, the area comes back as 259.8076211353, the apothem as 8.6602540378, the circumradius as exactly 10, and the interior angle as exactly 120°.

A regular polygon is one where all the sides are the same length and all the angles are the same size. That is a strong enough condition that, once you fix the number of sides, the shape has only one degree of freedom: a single measurement pins down everything else. This page is built around that fact, which is why the second dropdown asks which measurement you happen to have rather than assuming it is the side length. Working backwards from an area or from a measured diameter is often the real problem — and it is the part most polygon formulas sheets leave you to rearrange yourself.

The geometry behind all of it is one triangle. Join the centre of a regular n-gon to every corner and the shape falls into n identical isosceles triangles. Cut one of those in half down its own axis of symmetry and you have a right triangle whose short side is half a polygon side, whose long side is the apothem, whose hypotenuse is the circumradius, and whose angle at the centre is π ÷ n. Every formula on this page is that right triangle, written out. The apothem is ½ × side × cot(π ÷ n); the circumradius is ½ × side × csc(π ÷ n); and the area is n copies of ½ × side × apothem, which tidies up to ¼ × n × side² × cot(π ÷ n) — the three equations Wolfram MathWorld numbers (3), (5) and (7) on its Regular Polygon page.

The angles need no trigonometry at all. Triangulating an n-gon from one corner produces n − 2 triangles, and Euclid proved in Elements Book I, Proposition 32 that the interior angles of a triangle sum to two right angles. So the polygon's interior angles sum to (n − 2) × 180°, each interior angle in a regular polygon is that divided by n, and each exterior angle is the 180° remainder — which works out as 360° ÷ n, and is why the exterior angles of any convex polygon always add to a full turn no matter how many sides it has.

Two practical notes belong beside the answer. First, across flats is a real measurement only when the number of sides is even, because an odd polygon has no pair of opposite parallel sides; for odd n the figure reported is the diameter of the inscribed circle, which is what twice the apothem always means. Second, these formulas describe convex regular polygons. Star polygons such as the pentagram are also called regular under a broader definition and have a different area, and an irregular shape has no single apothem or circumradius at all — for that you need the vertex coordinates and the shoelace formula.

This page also covers the hexagon case in full, including the fastener question: enter across flats 19 with 6 sides and it returns a side length of 10.9696551146, because a hexagon's across-flats distance is its side times √3. That is the same reduction MathWorld makes when it notes that a regular hexagon's inradius, circumradius and area 'can be computed directly from the formulas for a general regular polygon'.

What is regular polygon calculator?

A regular polygon is a plane figure with n straight sides, all of equal length, meeting at n equal angles. The familiar members are the equilateral triangle (n = 3), the square (n = 4), the regular pentagon (n = 5), the regular hexagon (n = 6) and the regular octagon (n = 8), and the family continues indefinitely, converging on a circle as n grows. Two circles are associated with every regular polygon: the inscribed circle, which touches the midpoint of every side and whose radius is called the apothem or inradius, and the circumscribed circle, which passes through every vertex and whose radius is the circumradius. Wolfram MathWorld's Regular Polygon entry gives the standard relations for a polygon of n sides of length a: the inradius r = ½a·cot(π/n) as its Equation (3), the circumradius R = ½a·csc(π/n) as its Equation (5), and the area A = ¼na²·cot(π/n) as its Equation (7). The perimeter is simply na. The angle results are independent of the trigonometry and follow from triangulation: cutting an n-gon into n − 2 triangles from a single vertex, and applying Euclid's Elements Book I, Proposition 32 — 'the sum of the three interior angles of the triangle equals two right angles' — gives a total of (n − 2) × 180° for the interior angles of any simple convex n-gon, regular or not. Regularity then makes each one equal, at (n − 2) × 180° ÷ n, with an exterior angle of 360° ÷ n. The diagonal count, n(n − 3) ÷ 2, comes from counting rather than geometry: each of the n vertices joins to n − 3 non-adjacent vertices, and halving corrects for counting each diagonal from both ends.

How to use this calculator.

  1. Enter the number of sides. Whole numbers from 3 to 1000 — 3 is an equilateral triangle, 4 a square, 5 a pentagon, 6 a hexagon, 8 an octagon, 12 a dodecagon.
  2. Choose which measurement you already have from the second dropdown. Side length is the usual one, but apothem, circumradius, across flats, across corners, area and perimeter all work equally well and are often what you actually measured.
  3. Enter that value in any unit. Lengths come back in the same unit; the area comes back in that unit squared; angles are always in degrees.
  4. Read the area at the top, then the perimeter and the side length. If you want to sanity-check the area, confirm it equals half the perimeter times the apothem — that identity holds for every regular polygon.
  5. Use the apothem when you need the distance from the centre to the middle of a side — for laying out a paving pattern, a bolt circle, or the inside radius of a socket. Use the circumradius when you need the distance from the centre to a corner, which is the radius of the circle you would draw the polygon inside.
  6. For fasteners and machined parts, use Across flats. A hex nut or bolt head is specified by that measurement, and entering it with 6 sides gives you the side length and the across-corners distance you need for clearance.
  7. Note that across flats is a real distance only for an even number of sides. With an odd number there are no opposite parallel sides, and the figure shown is the inscribed circle's diameter — still twice the apothem, but not a caliper measurement.
  8. For an irregular shape, this page is the wrong tool: it has no single apothem or circumradius. Use the irregular polygon area calculator with your vertex coordinates instead.

The formula.

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

ONE TRIANGLE DOES ALL THE WORK. Join the centre of a regular n-gon to each of its n corners and the shape splits into n identical isosceles triangles, each with a polygon side as its base and the two circumradii as its equal sides. The angle at the centre in each is 2π ÷ n, since n of them fill a full turn. Now cut one of those triangles in half along its own axis of symmetry. What is left is a right triangle whose side opposite the centre is a ÷ 2 (half a polygon side), whose side adjacent to the centre is the apothem r, whose hypotenuse is the circumradius R, and whose angle at the centre is π ÷ n. Basic trigonometry on that one figure gives everything: tan(π ÷ n) = (a ÷ 2) ÷ r, so r = ½a·cot(π ÷ n); and sin(π ÷ n) = (a ÷ 2) ÷ R, so R = ½a·csc(π ÷ n). These are MathWorld's Equations (3) and (5).

AREA. Each of the n isosceles triangles has base a and height r, so its area is ½ar, and the polygon's area is n × ½ar = ½ × (na) × r = ½ × perimeter × apothem. Substituting r = ½a·cot(π ÷ n) gives A = ¼na²·cot(π ÷ n), MathWorld's Equation (7). The half-perimeter-times-apothem form is the one worth remembering, because it is the exact two-dimensional analogue of a circle's A = ½ × circumference × radius, and it shows why the polygon's area approaches πR² as n grows: the apothem creeps up towards the circumradius and the perimeter towards 2πR.

ANGLES, WITHOUT ANY TRIGONOMETRY. Pick one vertex of an n-gon and draw every diagonal from it. The polygon falls into n − 2 triangles. Euclid's Elements Book I, Proposition 32 states that 'the sum of the three interior angles of the triangle equals two right angles', so the polygon's interior angles total (n − 2) × 180°. This holds for any simple convex polygon, regular or not. Regularity adds that all n angles are equal, so each is (n − 2) × 180° ÷ n. The exterior angle is the supplement, 180° − (n − 2) × 180° ÷ n, which simplifies to 360° ÷ n — and since there are n of them, the exterior angles always total exactly 360°, however many sides the polygon has.

DIAGONALS. Take any vertex. It can be joined to n − 1 other vertices, but two of those joins are sides rather than diagonals, so it contributes n − 3 diagonals. Doing that at all n vertices counts every diagonal twice, once from each end, so the total is n(n − 3) ÷ 2. Equivalently, it is the number of vertex pairs C(n, 2) minus the n pairs that are sides. A triangle gets 3 × 0 ÷ 2 = 0, a square 4 × 1 ÷ 2 = 2, a hexagon 6 × 3 ÷ 2 = 9. This result is derived here rather than cited, because it is a two-line counting argument rather than an empirical or standards-governed value.

WORKING THE DEFAULT ALL THE WAY THROUGH. n = 6, side = 10. Then π ÷ 6 is 30°, cot 30° = √3 = 1.7320508076 and csc 30° = 2. The apothem is ½ × 10 × 1.7320508076 = 8.660254037844386, displayed as 8.6602540378. The circumradius is ½ × 10 × 2 = 10 exactly — equal to the side, which is the hexagon's signature property and the reason it is six equilateral triangles. The perimeter is 6 × 10 = 60. The area is ½ × 60 × 8.660254037844386 = 259.80762113533159, displayed as 259.8076211353. Across flats is 2 × 8.660254037844386 = 17.3205080757, which is the side times √3. Across corners is 2 × 10 = 20. The interior angle is 4 × 180 ÷ 6 = 120° exactly, the exterior is 360 ÷ 6 = 60°, the interior angles sum to 720°, and there are 6 × 3 ÷ 2 = 9 diagonals.

A CROSS-CHECK THAT USES NO TRIGONOMETRY AT ALL. MathWorld's separate Regular Hexagon page gives closed forms for n = 6: area (3√3 ÷ 2)a², inradius (√3 ÷ 2)a, circumradius a. At a = 10 those are 259.8076211353, 8.6602540378 and 10 — identical to the values above, reached without a single trigonometric function. The square (area exactly a²) and the equilateral triangle (area (√3 ÷ 4)a²) provide two further trig-free checks at other values of n. All three are in the test suite rather than only in this paragraph.

ROUNDING STAGE. Every calculation, including the trigonometry, runs at 40 significant digits, with π computed as 4 × arctan(1) rather than typed in. Whichever measurement you supply is converted to a side length first, and that side length is not rounded before the area, apothem, radii and diameters are derived from it — rounding it first would put visible error into the area, which is quadratic in the side. The angles are computed by exact fraction arithmetic instead of through the trigonometric path, which is why a hexagon returns exactly 120° rather than 119.999999999, and the diagonal count is exact integer arithmetic. Rounding happens once, at the return boundary, to 10 decimal places.

A worked example.

Example

A landscaper is laying a hexagonal paver bed with each edge 10 inches long and needs to know how much surface it covers, how much edging to buy, and how wide the finished shape will be in both directions. Entering 6 sides, side-length mode and 10 returns an area of 259.8076211353 square inches, a perimeter of 60 inches, an apothem of 8.6602540378 inches, a circumradius of exactly 10 inches, an across-flats width of 17.3205080757 inches, an across-corners width of exactly 20 inches, an interior angle of exactly 120°, an exterior angle of 60°, an interior angle sum of 720° and 9 diagonals. Read practically: the bed covers about 260 square inches, needs 60 inches of edging, measures 17.32 inches from one flat edge to the opposite one and 20 inches from one point to the opposite point — so it will fit in a 20-inch square opening but not a 18-inch one. The circumradius coming out at exactly 10, the same as the side, is the hexagon's signature: it means the shape is six equilateral triangles arranged around the centre, which is also why the area is 6 × (√3 ÷ 4) × 10² = 259.8076211353. The apothem of 8.6602540378 is 10 × √3 ÷ 2, and the across-flats of 17.3205080757 is 10 × √3 — the same √3 that runs through every 30-60-90 triangle, because half of one of those six equilateral triangles is exactly that. Checking the area a second way: half the perimeter times the apothem is ½ × 60 × 8.6602540378 = 259.8076211353, matching. Now switch the mode to Across flats and enter 19 with the same 6 sides — the hex-fastener case. The side length comes back as 10.9696551146 and the circumradius as the same 10.9696551146, so a 19 mm nut needs 21.9393102292 mm of clearance across its corners. That inversion is the reason this page takes seven different input measurements rather than only a side: on a real part, across flats is usually the only dimension you can actually measure.

number Of Sides6
value10
known Quantityside

Frequently asked questions.

What is the apothem of a regular polygon?
The perpendicular distance from the centre to the midpoint of any side — equivalently, the radius of the largest circle that fits inside the polygon. For a polygon of n sides of length a it is ½ × a × cot(π ÷ n). It is what makes the area formula simple: chop the polygon into n triangles with a side as base and the apothem as height, and the total area is ½ × perimeter × apothem. Do not confuse it with the circumradius, which runs from the centre to a corner and is always the larger of the two. Twice the apothem is the across-flats measurement of an even-sided polygon.
How do I find the area of a regular polygon?
Two equivalent routes. If you know the side length a and the number of sides n, use A = ¼ × n × a² × cot(π ÷ n), which is Equation (7) of MathWorld's Regular Polygon entry. If you already have the apothem, the easier form is A = ½ × perimeter × apothem, since the polygon is n triangles of base a and height equal to the apothem. For a hexagon of side 10 both give 259.8076211353. The second form is worth remembering because it mirrors a circle's A = ½ × circumference × radius, and it makes obvious why the polygon's area creeps up towards πR² as the number of sides grows.
What is the sum of the interior angles of a polygon?
(n − 2) × 180°, for any simple convex polygon with n sides — regular or not. Draw every diagonal from a single vertex and the polygon splits into n − 2 triangles, and Euclid proved in Elements Book I, Proposition 32 that the interior angles of a triangle sum to two right angles. So a quadrilateral gives 360°, a pentagon 540°, a hexagon 720°, an octagon 1080°. Regularity adds one extra fact: all n angles are equal, so each interior angle is (n − 2) × 180° ÷ n — 120° for a hexagon, 135° for an octagon. The exterior angles are a different story and are much simpler: each is 360° ÷ n, and they always add to exactly 360° whatever n is.
Where is the hexagon calculator?
This is it — set the number of sides to 6. Every quantity a dedicated hexagon page would report is here at that setting: area, perimeter, apothem, circumradius, across flats, across corners, the 120° interior angle, the 60° exterior angle and the 9 diagonals. The hexagon-specific facts are on this page too. Its circumradius equals its side length, which is why a regular hexagon is six equilateral triangles packed around a centre. Its across-flats distance is the side times √3, which is where the 30-60-90 triangle comes in — half of one of those six equilateral triangles is exactly one. MathWorld makes the same reduction, noting that a regular hexagon's inradius, circumradius and area can be computed directly from the general regular-polygon formulas. Rather than split one computation across two pages, we kept it here.
How do I get the side length from an across-flats measurement?
Select 'Across flats' as the known measurement and type the number. Internally, across flats is twice the apothem, so the side length is across-flats × tan(π ÷ n). For a hexagon that is across-flats ÷ √3: a 19 mm nut has a side length of 19 ÷ 1.7320508076 = 10.9696551146 mm and an across-corners dimension of 21.9393102292 mm. This is the practical direction for anyone working with fasteners, sockets, hex keys or machined stock, because across flats is the dimension those parts are specified by and often the only one you can put a caliper on. Note that across flats only makes sense as a physical measurement when the number of sides is even, since an odd polygon has no opposite parallel sides.
How many diagonals does a polygon have?
n(n − 3) ÷ 2. Each of the n vertices can be joined to n − 3 others — everything except itself and its two immediate neighbours, which give sides rather than diagonals — and doing that at every vertex counts each diagonal twice, once from each end. So a triangle has 0, a square has 2, a pentagon has 5, a hexagon has 9, an octagon has 20 and a dodecagon has 54. Equivalently the count is C(n, 2) − n, the number of vertex pairs minus the number that are sides. The formula holds for any simple polygon, regular or not, since it counts vertex pairs rather than measuring anything.
Does this work for irregular polygons or star polygons?
No to both, and for different reasons. An irregular polygon has sides of different lengths, so it has no single side length, no single apothem and no single circumradius — most of the outputs here would not even be defined. For that you need the vertex coordinates and the shoelace formula, which is what the irregular polygon area calculator does. Star polygons such as the pentagram are 'regular' under a broader definition that allows the edges to cross, and although they have equal sides and equal angles their area is different because the interior overlaps itself. Everything on this page assumes a convex regular polygon: equal sides, equal angles, no crossings. The sum-of-interior-angles and diagonal-count results are the two that survive into the irregular case, since they depend only on the number of vertices.

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.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 977 calculators remain free
  • No billing is enabled
Coming soon