Skip to content
Math

Polygon Calculator

Enter the number of sides and any one known dimension of a regular polygon - side length, inradius, circumradius, area, or perimeter - and every other property is calculated instantly. Results include area, perimeter, interior and exterior angles, the apothem (inradius), the circumscribed circle radius, the number of diagonals, and the areas of both circles. Switch between metric and imperial length units and step through the full worked solution.

Your details

Whole number of sides (3 = triangle, 4 = square, 5 = pentagon, and so on up to 100).
Select which dimension you already know. All other outputs are derived from it.
The length of one side of the regular polygon.
m
Area
64.9519

Total enclosed area of the polygon

Perimeter30
Side length (a)5
Inradius / apothem (r)4.3301
Circumradius (R)5
Interior angle120deg
Exterior angle60deg
Number of diagonals9
Incircle area58.9049
Circumcircle area78.5398
Polygon nameHexagon
Area64.9519
Incircle area58.9049
Circumcircle area78.5398

Hexagon with area 64.9519 (length units squared)

  • Each interior angle is 120 deg, and all interior angles together sum to 720 deg.
  • A Hexagon has 9 diagonals, computed as n(n-3)/2.
  • The circumradius is 1.1547 times the inradius. As n grows larger, this ratio approaches 1 and the polygon approaches a circle.

Next stepAll outputs assume a regular (equilateral and equiangular) polygon. For irregular polygons, use the Shoelace formula with known vertex coordinates.

Formula

a=2rtan(π/n)=2Rsin(π/n),A=na24tan(π/n),r=a2tan(π/n),R=a2sin(π/n),α=(n2)180n,d=n(n3)2a = 2r\tan(\pi/n) = 2R\sin(\pi/n),\quad A = \frac{na^2}{4\tan(\pi/n)},\quad r = \frac{a}{2\tan(\pi/n)},\quad R = \frac{a}{2\sin(\pi/n)},\quad \alpha = \frac{(n-2)\cdot180^\circ}{n},\quad d = \frac{n(n-3)}{2}

Worked example

A regular hexagon (n = 6) with side length 5 m: P = 6 x 5 = 30 m; r = 5 / (2 tan(30 deg)) = 4.3301 m; R = 5 / (2 sin(30 deg)) = 5 m; A = (6 x 25) / (4 tan(30 deg)) = 64.952 m^2; interior angle = (6-2) x 180 / 6 = 120 deg; diagonals = 6(6-3)/2 = 9.

What is a regular polygon?

A regular polygon is a closed plane shape whose sides are all the same length (equilateral) and whose interior angles are all the same (equiangular). A triangle, square, and hexagon are the simplest examples. Any number of sides from 3 upward is valid: a regular polygon with many sides such as a 100-gon looks nearly circular to the eye. This calculator handles any regular polygon from 3 to 100 sides. Irregular polygons, where sides or angles differ, require the Shoelace formula applied to known vertex coordinates instead.

How to use this calculator

Set the number of sides, then choose which dimension you already know from the "Known dimension" drop-down: side length, inradius (apothem), circumradius, area, or perimeter. Enter the value in your chosen unit system and the calculator derives every other property instantly. The "Show your work" panel walks through each formula step by step with your exact values. The reference table below the results lists angles and diagonal counts for the most common polygons.

Key dimensions explained

Side length (a) is the length of any one side. Inradius or apothem (r) is the perpendicular distance from the polygon centre to the midpoint of a side - it equals the radius of the largest circle that fits inside the polygon. Circumradius (R) is the distance from the centre to any vertex - it is the radius of the smallest circle that fits around the polygon. Interior angle is the angle inside the polygon at each vertex, computed as (n-2) x 180 / n degrees. Exterior angle is the supplement of the interior angle, always equal to 360 / n degrees. The number of diagonals is n(n-3)/2: a pentagon has 5, a hexagon has 9, and an octagon has 20.

Formulas for regular polygons

All properties follow from n (number of sides) and one known length. Perimeter: P = n x a. Inradius: r = a / (2 tan(pi/n)). Circumradius: R = a / (2 sin(pi/n)). Area: A = (n x a^2) / (4 tan(pi/n)), which can also be written as n x r x a / 2 or as n x r^2 x tan(pi/n). Interior angle: alpha = (n-2) x 180 / n degrees. Exterior angle: beta = 360 / n degrees. Number of diagonals: d = n(n-3)/2. Incircle area: pi x r^2. Circumcircle area: pi x R^2. To solve from circumradius, substitute a = 2R sin(pi/n); from inradius, substitute a = 2r tan(pi/n); from area, rearrange to a = sqrt(4A tan(pi/n) / n).

Real-world uses of polygon geometry

Polygon calculations appear in architecture (honeycomb grids, floor tiles, window frames), engineering (bolt heads, pipe flanges, gear profiles), landscaping (octagonal garden beds, hexagonal paving), woodworking (cutting regular segments for tabletops or frames), and computer graphics (polygon meshes and UI shapes). The apothem is especially useful for calculating the area of a floor tile from a known inset distance, and the circumradius matters when a shape must fit within a circular boundary.

Common regular polygons: angles and properties

Sides (n)NameInterior angleExterior angleDiagonals
3Triangle (trigon)60 deg120 deg0
4Square (tetragon)90 deg90 deg2
5Pentagon108 deg72 deg5
6Hexagon120 deg60 deg9
7Heptagon128.57 deg51.43 deg14
8Octagon135 deg45 deg20
9Nonagon140 deg40 deg27
10Decagon144 deg36 deg35
11Undecagon147.27 deg32.73 deg44
12Dodecagon150 deg30 deg54
13Tridecagon152.31 deg27.69 deg65
14Tetradecagon154.29 deg25.71 deg77

Angles and diagonal counts for regular polygons with 3 to 14 sides.

Frequently asked questions

What is the apothem of a polygon?

The apothem (also called the inradius) is the perpendicular distance from the centre of a regular polygon to the midpoint of any of its sides. It is also the radius of the largest circle that can be inscribed inside the polygon. For a regular polygon with n sides and side length a, the apothem is r = a / (2 tan(pi/n)).

How do you find the area of a regular polygon?

The most direct formula is A = (n x a^2) / (4 tan(pi/n)), where n is the number of sides and a is the side length. An equivalent form is A = (1/2) x perimeter x apothem, which is easy to remember because it mirrors the triangle area formula (base x height / 2). This calculator accepts the area as input and back-solves for the side length and all other dimensions.

How many diagonals does a polygon have?

The number of diagonals in a polygon with n sides is n(n-3)/2. A triangle (n=3) has 0, a square has 2, a pentagon has 5, a hexagon has 9, and an octagon has 20. The formula comes from counting all pairs of vertices (n choose 2 = n(n-1)/2) and subtracting the n sides that are not diagonals.

What is the difference between inradius and circumradius?

The inradius (r) is the radius of the inscribed circle - the largest circle that fits entirely inside the polygon, touching each side at its midpoint. The circumradius (R) is the radius of the circumscribed circle - the smallest circle that passes through all vertices. For any regular polygon, R is always larger than r (they are equal only in the limiting case of an infinite-sided polygon, which is a circle). The ratio R/r = 1/cos(pi/n).

What does the interior angle sum to for any polygon?

The sum of all interior angles in a polygon with n sides is (n-2) x 180 degrees. A triangle (n=3) sums to 180 deg, a quadrilateral to 360 deg, a pentagon to 540 deg, and a hexagon to 720 deg. For a regular polygon, each angle is that sum divided by n, giving (n-2) x 180 / n per angle.

Can I use this calculator for irregular polygons?

No. This calculator assumes a regular polygon where all sides and angles are equal. For an irregular polygon, the area and perimeter depend on the exact coordinates of each vertex. The standard method for irregular polygons is the Shoelace formula (also called the Surveyor formula): A = 0.5 x |sum of (x_i x y_{i+1} - x_{i+1} x y_i)| over all vertices.

How do I find the side length if I only know the area?

Rearrange the area formula A = (n x a^2) / (4 tan(pi/n)) to get a = sqrt(4A tan(pi/n) / n). Select "Area" from the "Known dimension" drop-down, enter your area, and the calculator solves for side length, radii, perimeter, and angles automatically.

Sources

Written by Dr. Elena Vasquez, PhD Mathematician · Lisbon, Portugal

Translating rigorous geometric theory into accurate, reliable calculation tools trusted by engineers, students, and researchers worldwide.

Search 3,500+ calculators

Loading search…