standarddeviationcalculator.net

Updated Free · runs in your browser

Math

Polygon calculator

For a regular polygon, give the number of sides and any one measurement to get every other one, with the angles and the number of diagonals. For an irregular polygon, list its corner coordinates and the shoelace formula gives the area, drawn to scale.

Area of the regular hexagon 41.5692 cm²
Side length s4 cm
Perimeter24 cm
Area41.5692 cm²
Circumradius R4 cm
Apothem (inradius)3.4641 cm
Interior angle120°
Exterior angle60°
Sum of interior angles720°
Number of diagonals9
s = 4 cmaR
Dashed: the circumscribed circle. a is the apothem, R the circumradius.
The same area in other units
UnitArea
Millimetres squared (mm²)4156.92
Centimetres squared (cm²)41.5692
Metres squared (m²)0.00415692
Kilometres squared (km²)4.15692e-9
Hectares (ha)4.15692e-7
Inches squared (in²)6.44324
Feet squared (ft²)0.0447447
Yards squared (yd²)0.00497164
Miles squared (mi²)1.60500e-9
Acres1.02720e-6
Show the working, step by step
  1. The side is given.

    s = 4

  2. Apothem and circumradius from the side.

    a = s ÷ (2 tan 30°) = 3.4641 R = s ÷ (2 sin 30°) = 4

  3. Area is half the perimeter times the apothem.

    A = ½ × 24 × 3.4641 = 41.5692

  4. Angles. The interior angles of any n-gon add up to (n − 2) × 180°; in a regular one they are equal.

    sum = (6 − 2) × 180° = 720° interior = 720° ÷ 6 = 120° exterior = 360° ÷ 6 = 60°

  5. Diagonals: each vertex joins to n − 3 others, and each diagonal is counted from both ends.

    n(n − 3) ÷ 2 = 6 × 3 ÷ 2 = 9

Regular polygon formulas

A regular polygon has n equal sides of length s and n equal angles. Joining the centre to every corner cuts it into n identical isosceles triangles, each with apex angle 360°/n, and every formula follows from one of those triangles.

R = s ÷ (2 sin(180°/n)) a = s ÷ (2 tan(180°/n)) P = ns A = ½Pa = ns² ÷ (4 tan(180°/n))

interior angle = (n − 2) × 180° ÷ n exterior angle = 360° ÷ n angle sum = (n − 2) × 180° diagonals = n(n − 3) ÷ 2

A worked example

The calculator opens on a regular hexagon with 4 cm sides.

  1. 180°/6 = 30°. Apothem a = 4 ÷ (2 tan 30°) = 3.46410 cm; circumradius R = 4 ÷ (2 sin 30°) = 4 cm. A hexagon's circumradius always equals its side, because it is made of six equilateral triangles.
  2. Perimeter 6 × 4 = 24 cm; area ½ × 24 × 3.46410 = 41.5692 cm².
  3. Interior angles (6 − 2) × 180° = 720° in total, 120° each; exterior angle 60°.
  4. Diagonals 6 × 3 ÷ 2 = 9.

Common regular polygons

nNameInterior angleAngle sumDiagonalsArea with side 1
3Equilateral triangle60°180°00.433013
4Square90°360°21
5Pentagon108°540°51.72048
6Hexagon120°720°92.59808
8Octagon135°1,080°204.82843
10Decagon144°1,440°357.69421
12Dodecagon150°1,800°5411.1962

For side length s, multiply the last column by s². As n grows, a regular polygon with a fixed circumradius approaches the circle: its area tends to πR², which is how Archimedes bounded π using polygons of 96 sides.

Area from coordinates: the shoelace formula

A = ½ |Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)|, with the last vertex joined back to the first

Choose “Irregular, from vertex coordinates” and enter the corners in order. The default pentagon has corners (0, 0), (6, 0), (7, 4), (3, 7) and (−1, 4). The five cross-products are 0, 24, 37, 19 and 0, which sum to 80, so the area is 80 ÷ 2 = 40 square units. The sum is positive, which means the corners were listed anticlockwise. The same method measures a plot of land from surveyed corner points or a floor plan from its coordinates, and it works for concave shapes such as an L-shaped room as long as the edges do not cross.

Common mistakes

  • Mixing up the apothem and the circumradius. The area formula ½Pa needs the apothem, the shorter one.
  • Using the interior-angle formula for the angle sum. (n − 2) × 180° is the total; divide by n for one angle of a regular polygon.
  • Entering vertices out of order in the shoelace method, which makes the edges cross.
  • Assuming a shape is regular because its sides are equal. A rhombus has four equal sides but is not a regular polygon unless its angles are equal too.

Common questions

What is the sum of the interior angles of a polygon?

(n − 2) × 180° for any simple polygon with n sides, regular or not. Pick one corner and draw diagonals to every other corner: they cut the polygon into n − 2 triangles, each with 180°. A pentagon has 540°, a hexagon 720°, a decagon 1,440°. In a regular polygon every angle is the same, so each interior angle is (n − 2) × 180° ÷ n: 120° for a hexagon.

What is the difference between the apothem and the circumradius?

The circumradius R runs from the centre to a corner; the apothem a runs from the centre to the middle of a side, meeting it at a right angle. The apothem is the radius of the inscribed circle, the circumradius that of the circle through the corners. For a hexagon with 4 cm sides, R = 4 cm and a = 3.46410 cm. They are linked by a = R cos(180°/n).

How many diagonals does a polygon have?

n(n − 3) ÷ 2. Each of the n corners connects to every other corner except itself and its two neighbours, which gives n − 3 diagonals per corner; dividing by 2 stops each diagonal being counted from both ends. A hexagon has 6 × 3 ÷ 2 = 9 diagonals, and a 12-sided dodecagon has 54.

How does the shoelace formula work?

Write the vertices in order round the edge, then for each edge compute xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ. That number is twice the signed area of the triangle formed by the edge and the origin. Adding them round the whole polygon cancels the parts outside and leaves twice the polygon's area. Halve it and drop the sign. The name comes from the criss-cross pattern the products make when the coordinates are written in two columns.

Why is the shoelace result wrong for my shape?

Almost always because the vertices are not in order round the boundary. If you jump across the shape, two edges cross, the polygon becomes a bow tie, and the formula subtracts one part from the other. The calculator warns when edges cross. The points can run clockwise or anticlockwise; that only changes the sign, which is removed.