HomeGeometry › Regular Polygon Calculator

Regular Polygon Calculator

Computes the area, perimeter, interior and exterior angles in degrees, apothem, circumradius and number of diagonals of a regular polygon from its number of sides and side length.

When to use

You need properties of an equilateral, equiangular polygon (pentagon, hexagon, octagon, …) with 3 to 100 sides.

Do not use when: The polygon is irregular (split it into triangles and use triangle-area) or is a square, for which rectangle also works.

Formula

With n = number_of_sides and s = side_length: area = n·s² / (4·tan(π/n)); perimeter = n·s; interior angle = (n − 2)·180°/n; exterior angle = 360°/n; apothem = s / (2·tan(π/n)); circumradius = s / (2·sin(π/n)); diagonals = n·(n − 3)/2

Inputs

ParameterTypeUnitRequiredDescription
number_of_sidesintegeryesNumber of sides n (3 = equilateral triangle, 4 = square, 6 = hexagon, …). Range: ≥ 3, ≤ 100
side_lengthnumberunitsyesLength of each side. Range: > 0

Outputs

OutputTypeUnitDescription
polygon_namestringCommon name of the polygon (e.g. hexagon), or n-gon.
areanumberunits²n × s² / (4 × tan(180° / n)).
perimeternumberunitsn × s.
interior_angle_degnumberdegrees(n − 2) × 180° / n.
exterior_angle_degnumberdegrees360° / n.
interior_angle_sum_degnumberdegrees(n − 2) × 180°.
apothemnumberunitsDistance from the centre to the middle of a side = s / (2 × tan(180° / n)).
circumradiusnumberunitsDistance from the centre to a vertex = s / (2 × sin(180° / n)).
diagonalsintegern × (n − 3) / 2.

Example

Hexagon, side 2: {"number_of_sides":6,"side_length":2}{"polygon_name":"hexagon","area":10.3923,"perimeter":12,"interior_angle_deg":120,"exterior_angle_deg":60,"interior_angle_sum_deg":720,"apothem":1.7321,"circumradius":2,"diagonals":9}

Pentagon, side 10: {"number_of_sides":5,"side_length":10}{"polygon_name":"pentagon","area":172.0477,"perimeter":50,"interior_angle_deg":108,"exterior_angle_deg":72,"apothem":6.8819,"circumradius":8.5065,"diagonals":5}

GET https://tttkmbb.com/api/v1/calculate/regular-polygon?number_of_sides=6&side_length=2

Machine access

Sources

FAQ

What is the apothem?

The perpendicular distance from the centre to a side, equal to the radius of the inscribed circle. Area also equals perimeter × apothem / 2.

Can I start from the circumradius instead of the side?

Convert first: side = 2 × R × sin(180° / n), then enter that side length.

Related calculators