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.
Formula
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) | Name | Interior angle | Exterior angle | Diagonals |
|---|---|---|---|---|
| 3 | Triangle (trigon) | 60 deg | 120 deg | 0 |
| 4 | Square (tetragon) | 90 deg | 90 deg | 2 |
| 5 | Pentagon | 108 deg | 72 deg | 5 |
| 6 | Hexagon | 120 deg | 60 deg | 9 |
| 7 | Heptagon | 128.57 deg | 51.43 deg | 14 |
| 8 | Octagon | 135 deg | 45 deg | 20 |
| 9 | Nonagon | 140 deg | 40 deg | 27 |
| 10 | Decagon | 144 deg | 36 deg | 35 |
| 11 | Undecagon | 147.27 deg | 32.73 deg | 44 |
| 12 | Dodecagon | 150 deg | 30 deg | 54 |
| 13 | Tridecagon | 152.31 deg | 27.69 deg | 65 |
| 14 | Tetradecagon | 154.29 deg | 25.71 deg | 77 |
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.