Solved.tools: Free Online Calculators & Tools

We use cookies for analytics and advertising. Learn more about our cookie policy

Polygon Calculator

Last updated: 27 June 2026

Reviewed by Gavin Meiring, Lead research and primary author · Doctoral Candidate (Corporate Governance) · Research and drafting assisted by AI

Was this helpful?


Polygon Calculator

A polygon calculator computes the area, perimeter, interior angles, exterior angles, and diagonal count of regular and irregular polygons. It is used by students studying geometry, architects, designers, and engineers who work with multi-sided shapes in both theoretical and applied contexts.

How to Use the Polygon Calculator

  1. Select whether your polygon is regular (all sides and angles equal) or irregular.
  2. For a regular polygon, enter the number of sides and either the side length, circumradius (radius of circumscribed circle), or apothem (radius of inscribed circle).
  3. For an irregular polygon, enter the coordinates of each vertex or the lengths of each side.
  4. Click Calculate to see the area, perimeter, all interior angles, exterior angles, and number of diagonals.
  5. View the polygon diagram drawn to scale for a visual reference.

The Formula

For a regular polygon with n sides and side length s:

Perimeter = n x s

Interior angle = (n - 2) x 180° / n

Exterior angle = 360° / n

Area = (n x s^2) / (4 x tan(pi / n))

Number of diagonals = n x (n - 3) / 2

apothem a (distance from centre to the midpoint of a side): a = s / (2 x tan(pi / n))

Real-World Example

Find the area, interior angle, and number of diagonals of a regular hexagon with side length 6 cm.

n = 6, s = 6

Interior angle = (6 - 2) x 180 / 6 = 4 x 180 / 6 = 720 / 6 = 120°

Exterior angle = 360 / 6 = 60°

Area = (6 x 36) / (4 x tan(30°)) = 216 / (4 x 0.5774) = 216 / 2.309 = 93.53 cm^2

Diagonals = 6 x (6 - 3) / 2 = 6 x 3 / 2 = 9

Perimeter = 6 x 6 = 36 cm

Polygons in Architecture and Nature

Regular polygons appear extensively in both natural and human-made structures. The hexagon is the most efficient shape for tiling a flat surface: it minimises perimeter for a given area, which is why honeybees build hexagonal cells to use the least wax. Triangles appear in structural engineering as the only rigid polygon: trusses, bridges, and roof supports use triangular frameworks because triangles cannot be deformed without changing side lengths. Architects use regular polygons in floor plans, window designs, and decorative tiling (Islamic geometric art is famous for intricate polygon tessellations). Octagons appear in road signage (stop signs) precisely because their unusual shape is immediately recognisable at a distance. In computer graphics and game development, complex 3D surfaces are approximated using triangles and quadrilaterals, making polygon mathematics central to rendering pipelines.

Frequently Asked Questions

What is the sum of interior angles of any polygon? For a polygon with n sides, the sum of interior angles is (n - 2) x 180 degrees. A triangle (n=3) has 180°, a quadrilateral (n=4) has 360°, a pentagon (n=5) has 540°, and so on. This formula works for any convex polygon. For regular polygons, dividing by n gives the measure of each individual interior angle.

What is the difference between a regular and irregular polygon? A regular polygon has all sides of equal length and all interior angles equal. Examples include equilateral triangles, squares, regular pentagons, and hexagons. An irregular polygon has sides or angles of different sizes, such as a rectangle (equal angles but unequal sides in the general case) or a scalene triangle.

How many diagonals does a polygon have? The formula n x (n-3) / 2 gives the number of diagonals. A triangle has 0 diagonals, a quadrilateral has 2, a pentagon has 5, a hexagon has 9, and a decagon (10 sides) has 35. The formula counts all line segments connecting non-adjacent vertices.

Can a polygon have curved sides? By definition, a polygon must have straight sides. Shapes with curved boundaries (circles, ellipses) are not polygons. However, a circle can be approximated to any desired precision by a regular polygon with a very large number of sides. This is the basis of the ancient method of computing pi by inscribing and circumscribing polygons within a circle.

The regular polygons from three sides to twelve

Setting the side length at 6 cm, which is the hexagon in the page's own example, every other regular polygon can be read off the same set of formulas. The area column reproduces the page's 93.53 cm^2 in the six-sided row.

SidesInterior angleExterior angleDiagonalsApothemPerimeterArea
360.00°120.00°01.7321 cm18.00 cm15.59 cm^2
490.00°90.00°23.0000 cm24.00 cm36.00 cm^2
5108.00°72.00°54.1291 cm30.00 cm61.94 cm^2
6120.00°60.00°95.1962 cm36.00 cm93.53 cm^2
7128.57°51.43°146.2296 cm42.00 cm130.82 cm^2
8135.00°45.00°207.2426 cm48.00 cm173.82 cm^2
9140.00°40.00°278.2424 cm54.00 cm222.55 cm^2
10144.00°36.00°359.2331 cm60.00 cm276.99 cm^2
11147.27°32.73°4410.2171 cm66.00 cm337.16 cm^2
12150.00°30.00°5411.1962 cm72.00 cm403.06 cm^2

Two of the rows can be checked without a calculator. The square with a 6 cm side has an area of 36 cm^2 exactly, and the 3 cm apothem is half the side length, as it must be. The triangle with a 6 cm side has an area of 9 x the square root of 3, which is 15.5885 cm^2, and the hexagon has an area of 54 x the square root of 3, which is 93.5307 cm^2.

Reading the apothem back off the side length

The apothem column is the one that connects the page's area formula to the simpler perimeter relationship. For any regular polygon, the area is also half the perimeter multiplied by the apothem, because the polygon can be cut into as many identical triangles as it has sides, each with the apothem as its height.

SidesPerimeterApothemPerimeter x apothem / 2Area from the page's formula
424.00 cm3.0000 cm36.0000 cm^236.00 cm^2
636.00 cm5.1962 cm93.5307 cm^293.53 cm^2
848.00 cm7.2426 cm173.8234 cm^2173.82 cm^2
1272.00 cm11.1962 cm403.0615 cm^2403.06 cm^2

Every row agrees to the last decimal place shown, which is a useful check on the area formula: a result that does not match the perimeter and apothem route is a rounding error somewhere in the tangent. The hexagon's apothem is 3 x the square root of 3, or 5.1962 cm, and its radius is exactly 6 cm, the same as the side length, which is the property that makes a regular hexagon tile a flat surface.

The apothem also grows with the side count at a fixed side length, from 1.7321 cm at three sides to 11.1962 cm at twelve. A polygon with more sides is a fatter shape at the same side length, which is why the area climbs from 15.59 cm^2 to 403.06 cm^2 across the table.

How much of the surrounding circle the polygon fills

Drawing a circle through every vertex of the polygon gives a circle of radius 6 cm for the hexagon, and the polygon fills a fixed share of it. That share depends only on the number of sides, not on the side length, and it approaches 1 as the sides increase.

SidesShare of the circumscribed circle filled
341.35%
463.66%
575.68%
682.70%
890.03%
1295.49%
2098.36%
6099.82%
10099.93%
1,00099.999%

The share is (n / 2 pi) x sin(2 pi / n), with n the number of sides and the angle in radians. A triangle fills 41.35 percent of its circle and a square 63.66 percent, so the square is the more efficient of the two despite having only one more side. The gain per added side falls away quickly: the step from 3 to 4 sides adds 22.31 points, and the step from 99 to 100 sides adds well under a point. That decay is the arithmetic behind the page's FAQ point that a circle can be approximated by a polygon with many sides, and it is the method Archimedes used to bound pi from both sides.

Interior angles summed across the family

The interior angle column comes from the page's formula (n minus 2) x 180 / n, and the numerator of that formula is the sum of the interior angles before it is divided.

SidesSum of interior anglesEach interior angleEach exterior angle
3180°60.00°120.00°
4360°90.00°90.00°
6720°120.00°60.00°
81,080°135.00°45.00°
121,800°150.00°30.00°

Summed across the ten polygons in the first table, from three sides to twelve, the interior angles come to 9,900°. The exterior angle column falls towards zero as the sides increase, and the interior angle rises towards 180°, which is the limit a polygon approaches as it becomes indistinguishable from a circle. The two columns always add to 180° at every row, which is another check a reader can run by eye.

Why the hexagon tiles and the pentagon does not

The page describes the hexagon as the most efficient shape for tiling a flat surface, and the angle table shows why it works. Three hexagons meet at a point with three interior angles of 120°, which is exactly 360°. Four squares meet with four angles of 90°, and six triangles meet with six angles of 60°. Those three, and only those three, are the regular polygons that tile the plane alone.

The pentagon fails on the arithmetic. Three interior angles of 108° come to 324°, which leaves a 36° gap, and four come to 432°, which overlaps by 72°. Neither fits, so no arrangement of regular pentagons covers a surface without leaving gaps. The honeycomb the page mentions is the hexagon case in the wild, and the same 120° angle is why the cells meet three at a time.

What the regular polygon formulas assume

  • Every formula in the first table describes a regular polygon, with equal sides and equal angles. An irregular polygon needs the coordinates of its vertices and the shoelace formula for area, not these expressions.
  • The area formula uses the tangent of pi divided by n, so the angle must be in radians in that expression. Working in degrees and feeding the figure straight in gives a wrong area.
  • Units run through the whole calculation. A side length in centimetres gives an area in square centimetres and a perimeter in centimetres, and mixing a side in millimetres with a side in centimetres produces a perimeter that adds two different things.
  • The diagonal count is a whole number for every polygon, since n x (n minus 3) is always even. A fractional result means the arithmetic has gone wrong somewhere.
  • The circle coverage figure assumes the polygon is inscribed in the circle, with the vertices on the circumference. A polygon circumscribed around the circle fills more than the circle itself and is a different calculation.

Also try these free tools: