Regular Polygon Area Calculator Formula

Understand the math behind the regular polygon area calculator. Each variable explained with a worked example.

Formulas Used

Area

area = (n * pow(side_len, 2)) / (4 * tan(pi / n))

Perimeter

perimeter = n * side_len

Interior Angle

interior_angle = (n - 2) * 180 / n

Apothem

apothem = side_len / (2 * tan(pi / n))

Variables

VariableDescriptionDefault
nNumber of Sides6
side_lenSide Length5

How It Works

Regular Polygon Formulas

Area

Area = (n × s²) / (4 × tan(pi/n))

Alternatively: Area = (1/2) × perimeter × apothem

Interior Angle

Interior angle = (n - 2) × 180 / n degrees

Apothem

Apothem = s / (2 × tan(pi/n))

The apothem is the distance from the center to the midpoint of a side.

Worked Example

Regular hexagon with side length 5.

n = 6side_len = 5
  1. 01Area = (6 × 25) / (4 × tan(pi/6)) = 150 / (4 × 0.5774) ≈ 64.9519
  2. 02Perimeter = 6 × 5 = 30
  3. 03Interior angle = (6-2) × 180/6 = 120°
  4. 04Apothem = 5 / (2 × 0.5774) ≈ 4.3301

Ready to run the numbers?

Open Regular Polygon Area Calculator