Regular Polygon Calculator - Area & Angles of Any N-Gon

A regular hexagon — 3 to 1,000 sides

Common shapes

cm

Regular hexagon, drawn to scale

Dashed circles: the circumcircle through every vertex and the incircle touching every side.

aRs
s — side length
12 cm
a — apothem (inradius)
10.392 cm
R — circumradius
12 cm

Area of the regular hexagon

374.123 cm²

Perimeter (n · s)

72 cm

Across the flats (2a)

20.785 cm

Interior angle

120°

Exterior = central angle

60°

Sum of interior angles

720°

Diagonals

9

Longest diagonal

24 cm

Symmetry

6 axes · order 6

How close to a circle is this shape?

Polygon area ÷ circumcircle area82.7%

The share of the circle through the vertices that the polygon actually covers.

Incircle area ÷ polygon area90.7%

The largest circle that fits inside, as a share of the polygon — the offcut when you turn this shape on a lathe.

a / R = cos(180°/6) = 0.86603, so the apothem is always 86.6% of the circumradius for a hexagon.

Step-by-step solution

  1. n = 6 sides, so the half-angle is 180°/n = 30°
  2. Given side length s = 12 cm
  3. a = s / (2 · tan(180°/n)) = 12 / 1.1547 = 10.392 cm
  4. R = s / (2 · sin(180°/n)) = 12 / 1 = 12 cm
  5. P = n · s = 6 × 12 = 72 cm
  6. A = ½ · P · a = ½ × 72 × 10.392 = 374.123 cm²
Diagonal lengths by vertex skip (2 distinct)
Distance between vertices k steps apart: d = 2R · sin(k · 180°/n)
Skip kLengthAs a multiple of s
220.785 cm1.7321×
324 cm2×
Vertex coordinates for drafting and CNC
Centred on the origin with one flat side facing down, matching the diagram above.
Vertexx (cm)y (cm)
16-10.392
2120
3610.392
4-610.392
5-121.470e-15
6-6-10.392

How to Use This Calculator

  1. Type how many sides your shape has into “Number of sides (n)”, or tap one of the Common shapes chips for a triangle, square, pentagon, hexagon, octagon, decagon or dodecagon.
  2. Pick the one measurement you actually have in “What you already know” — side length, perimeter, apothem, circumradius or area. Everything else is derived from it, so you never need two inputs.
  3. Enter that number, then set the Unit. Lengths come back in the same unit and areas in its square, so millimetres in means mm² out.
  4. Check the diagram before you trust the number: the teal line marked a is the apothem (centre to the middle of a side) and the blue line marked R is the circumradius (centre to a corner). Confusing the two is the most common polygon error.
  5. Open “Diagonal lengths by vertex skip” for every distinct diagonal, or “Vertex coordinates” to copy x-y pairs straight into CAD. Raise the Rounding setting when you need machining precision.

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

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

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:
Regular Polygon Calculator diagram showing a hexagon and octagon with apothem, circumradius and central angle marked

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:

What happens to A = ½Pa when the circumradius is used in place of the apothem.
Sides na / RR / aArea error if swapped
30.50002.0000+100%
40.70711.4142+41.4%
50.80901.2361+23.6%
60.86601.1547+15.5%
80.92391.0824+8.2%
120.96591.0353+3.5%
200.98771.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:

Getting to the side length from any single known quantity, where θ = 180°/n.
What you knowConvert to side lengthTypical source
Perimeter Ps = P / nFencing or edging length
Apothem as = 2a · tan θHalf the across-flats reading
Circumradius Rs = 2R · sin θBolt-circle or lathe stock radius
Area As = √(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:

Area = k · s². The last column is how much of the circumscribed circle the polygon covers.
nNameInterior anglek (area ÷ s²)DiagonalsFills circle
3Triangle60°0.4330041.3%
4Square90°1.0000263.7%
5Pentagon108°1.7205575.7%
6Hexagon120°2.5981982.7%
7Heptagon128.571°3.63391487.1%
8Octagon135°4.82842090.0%
10Decagon144°7.69423593.5%
12Dodecagon150°11.19625495.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.

Frequently Asked Questions

Still Have Questions?

The detailed content on this page provides comprehensive explanations and examples to help you understand better.