Regular Polygon Calculator

Given the number of sides plus any one of side length, apothem, circumradius, area or perimeter, get every other value — including interior and exterior angles, incircle and circumcircle areas — for any regular polygon (n ≥ 3). Live diagram, selected-polygons reference table and step-by-step working.

Material / cost estimator

Enter a price per square metre (tile, sheet metal, decking, land) to estimate total cost from the polygon's area.

Enter a price and calculate an area to see the total.

What is a regular polygon?

A regular polygon is a closed 2D shape with n straight sides that are all the same length and n interior angles that are all equal. Equilateral triangles, squares, regular pentagons, hexagons and octagons are the familiar cases; the formulas below work for any integer n ≥ 3.

The shape is fully described by n plus any single length — the side s, apothem r, circumradius R, perimeter P or area A. Every other measurement is then determined.

Regular polygon, case by case

Given n and side s — the classic case

Slice the polygon into n identical isosceles triangles from the centre. Each has base s and height r (the apothem). Add them up and you get the standard area formula.

A = ¼·n·s²·cot(π/n)
nnumber of sides (≥ 3)·sside length
n = 6
Example
Given
n = 6
s = 4
Substitute
A = ¼ × 6 × 16 × cot(π/6)
= 24√3
Answer
A ≈ 41.5692

Given n and apothem r

The apothem (a.k.a. inradius) is the perpendicular distance from the centre to a side — the radius of the inscribed circle. Sides and area follow directly.

s = 2·r·tan(π/n)
A = n·r²·tan(π/n)
rapothem (inradius)
n = 8
Example
Given
n = 8
r = 5
Substitute
s = 2·5·tan(π/8) ≈ 4.142
A = 8·25·tan(π/8)
Answer
A ≈ 82.843

Given n and circumradius R

The circumradius is the centre-to-vertex distance — the radius of the circumscribed circle. Every regular polygon fits perfectly inside a circle of radius R.

s = 2·R·sin(π/n)
A = ½·n·R²·sin(2π/n)
Rcircumradius
n = 5
Example
Given
n = 5
R = 10
Substitute
s = 2·10·sin(π/5) ≈ 11.756
A = ½·5·100·sin(2π/5)
Answer
A ≈ 237.764

Given n and area A — reverse-solve the side

Rearrange the area formula for s. Useful when you know how much surface a tile or panel should cover but need to work back to the edge length.

s = √(4·A·tan(π/n) / n)
Atarget area
n = 6
Example
Given
n = 6
A = 41.5692
Substitute
s = √(4·41.5692·tan(π/6)/6)
Answer
s ≈ 4

Given n and perimeter P

Because every side has the same length, the perimeter divides evenly: s = P/n. From there every other quantity follows.

s = P/n
Pperimeter
n = 6
Example
Given
n = 6
P = 24
Substitute
s = 24/6
= 4
A = ¼·6·16·cot(π/6)
Answer
A ≈ 41.5692

Interior and exterior angles

The interior angle is the angle between two adjacent sides at any vertex. The exterior angle is its supplement — equivalently, the central angle subtended by one side. They always sum to 180°.

x = (n−2)·180° / n
y = 360° / n
xinterior angle·yexterior / central angle
n = 8
Example
Given
n = 8 (octagon)
Substitute
x = 6·180°/8
y = 360°/8
Answer
x = 135°
y = 45°

Formulas at a glance

Interior angle x = (n − 2)·180° / n
Exterior / central angle y = 360° / n
Side ↔ apothem s = 2·r·tan(π/n)
r = ½·s·cot(π/n)
Side ↔ circumradius s = 2·R·sin(π/n)
R = ½·s·csc(π/n)
Apothem ↔ circumradius r = R·cos(π/n)
R = r·sec(π/n)
Perimeter P = n·s
Area A = ¼·n·s²·cot(π/n)
= n·r²·tan(π/n)
= ½·n·R²·sin(2π/n)
= ½·P·r
Incircle area Aᵢ = π·r² Circumcircle area A_c
= π·R²

All formulas — every calculation mode

The symbolic chain each mode of this calculator evaluates. n is the number of sides, s the side length, r the apothem (inradius), R the circumradius, P the perimeter and A the area.

1. Given n and s
P = n·s
r = ½·s·cot(π/n)
R = ½·s·csc(π/n)
A = ¼·n·s²·cot(π/n)
2. Given n and r (apothem)
s = 2·r·tan(π/n)
R = r·sec(π/n)
P = n·s
A = n·r²·tan(π/n)
3. Given n and R (circumradius)
s = 2·R·sin(π/n)
r = R·cos(π/n)
P = n·s
A = ½·n·R²·sin(2π/n)
4. Given n and A (area)
s² = 4·A·tan(π/n) / n
s = √(4·A·tan(π/n) / n)
then r
R
P via mode 1
5. Given n and P (perimeter)
s = P/n
then r
R
A via mode 1
Angles (always available)
Interior x = (n−2)·180° / n
Exterior / central y = 360° / n
x + y = 180°

Selected regular polygons

nNameShapeInterior xExterior yArea (s = 1)
3Equilateral triangle (trigon)60°120°0.43301
4Square (tetragon)90°90°1
5Pentagon108°72°1.72048
6Hexagon120°60°2.59808
7Heptagon128.5714°51.4286°3.63391
8Octagon135°45°4.82843
9Nonagon (enneagon)140°40°6.18182
10Decagon144°36°7.69421
11Hendecagon147.2727°32.7273°9.36564
12Dodecagon150°30°11.19615
13Tridecagon152.3077°27.6923°13.18577
14Tetradecagon154.2857°25.7143°15.3345
15Pentadecagon156°24°17.64236
16Hexadecagon157.5°22.5°20.10936
17Heptadecagon158.8235°21.1765°22.73549
18Octadecagon160°20°25.52077
19Enneadecagon161.0526°18.9474°28.46519
20Icosagon162°18°31.56876

Interior angle x = (n−2)·180°/n and exterior y = 360°/n. The "Area (s = 1)" column equals ¼·n·cot(π/n) — the area of a regular n-gon whose side length is one unit; scale by s² for any other side.

Where the formulas come from

Slice from the centre. Draw straight lines from the centre to every vertex. You get n identical isosceles triangles, each with two sides equal to the circumradius R and an apex angle of 2π/n. The base of each triangle is one side s, and its height is the apothem r.

Side. Half of one triangle's base is the opposite leg of a right triangle with hypotenuse R and angle π/n: s/2 = R·sin(π/n). Similarly the adjacent leg is the apothem: r = R·cos(π/n). Rearranging gives the side ↔ apothem and side ↔ circumradius formulas.

Area. Each isosceles triangle has area ½·s·r, and there are n of them, so A = ½·n·s·r = ½·P·r. Substituting r = ½·s·cot(π/n) gives the closed form A = ¼·n·s²·cot(π/n).

Angles. Any convex n-gon has interior angles summing to (n − 2)·180°; dividing by n gives the interior angle of a regular polygon. The exterior angle is the supplement and equals the central angle each side subtends.

Worked example — hexagonal floor tile

A hexagonal tile has side s = 15 cm. What is its area, perimeter, and how large is the inscribed circle you could stamp into the middle of it?

P = n·s
= 6 × 15
= 90 cm
r = ½·s·cot(π/6)
= 7.5 × √3 ≈ 12.9904 cm
A = ¼·6·15²·cot(π/6)
= 337.5·√3 ≈ 584.567 cm²
Incircle area πr² ≈ 530.144 cm²

So a 15 cm hexagon covers about 584.6 cm² and would just contain a circle of radius 12.99 cm (diameter ≈ 25.98 cm).

Worked example — octagonal gazebo floor

You want a regular-octagon gazebo floor with area A = 20 m². What side length and outer diameter do you need to cut to?

s = √(4·A·tan(π/8) / n)
= √(4 × 20 × tan(π/8) / 8) ≈ 2.033 m
R = ½·s·csc(π/8) ≈ 2.657 m ⇒ outer diameter 2R ≈ 5.313 m
Perimeter P = 8·s ≈ 16.264 m

The centre-to-vertex measurement is about 2.66 m, so the octagon just fits inside a circle roughly 5.31 m across.

What this tool does for you

  • Five solve modes — given n plus any one of side, apothem, circumradius, area or perimeter
  • Handles every integer n ≥ 3 (up to 10 000), not just the named list — pick a preset or type a custom value
  • Reports side, perimeter, apothem, circumradius, area, interior/exterior angles, and incircle/circumcircle areas
  • Live SVG diagram labeled with s, r and R plus incircle and circumcircle overlays
  • Unit selector (mm, cm, m, km, in, ft, yd) with automatic m² conversion for the cost estimator
  • Significant-figures control (2–8) for all reported numbers
  • Selected-polygons reference table from trigon (n = 3) to icosagon (n = 20) with interior and exterior angles and unit-side area
  • Show/hide step-by-step working for every mode
  • Material or cost estimator — enter a price per m² and get the total

Frequently asked questions

+What is a regular polygon?
A regular polygon is a closed 2D shape whose n sides all have the same length and whose n interior angles are all equal. Squares, equilateral triangles, pentagons, hexagons and octagons are the everyday examples.
+What is the formula for the area of a regular polygon?
With n sides of length s:
A = ¼·n·s²·cot(π/n)
= ½·P·r
where P = n·s is the perimeter and r = ½·s·cot(π/n) is the apothem (inradius). Both forms come from slicing the polygon into n identical isosceles triangles.
+What's the difference between the apothem, inradius, and circumradius?
The apothem and the inradius are the same thing: the perpendicular distance from the centre to the midpoint of a side, which is also the radius of the inscribed circle. The circumradius R is the centre-to-vertex distance and equals the radius of the circumscribed circle. They are linked by
r = R·cos(π/n)
R = r·sec(π/n).
+How do I find the interior and exterior angles?
x = (n − 2)·180° / n (interior)
y = 360° / n (exterior / central)
They always sum to 180°. An octagon (n = 8) has interior 135° and exterior 45°; a hexagon (n = 6) has 120° and 60°.
+Which values do I need to enter?
The number of sides n plus any one of side s, apothem r, circumradius R, area A or perimeter P. Every other quantity is then determined.
+Can I use this for hexagons, octagons and dodecagons?
Yes — pick n = 6 for a hexagon, n = 8 for an octagon, n = 12 for a dodecagon. Any integer n ≥ 3 works (up to 10 000 via the custom input).
+What happens as n gets very large?
As n → ∞ the polygon converges to a circle: apothem and circumradius merge (r ≈ R), and the area formula collapses to A ≈ π·R², matching the circle's area.
+How is this different from the Area Calculator's polygon shape?
The general Area Calculator computes only area from n and s. This dedicated tool additionally solves for apothem, circumradius, interior/exterior angles, and reverse- solves the side from area, perimeter, apothem or circumradius.

Related calculators