Regular Polygon Calculator for Area, Apothem, Angles and Diagonals

Enter the number of sides, or work it out from a corner angle, plus one measurement: side, perimeter, area, apothem, circumradius, or width across flats or corners. The calculator gives the full shape, with every angle, the diagonals, the inscribed and circumscribed circles and the mitre angle for building it, plus a drawing and step-by-step working.

Polygon measurements

Show on the diagram

How to use the regular polygon calculator

Enter the number of sides, or pick a named shape. Then enter one measurement you know: the side length, perimeter, area, apothem, circumradius, or the width across flats or across corners. One size is enough, because every regular polygon with the same number of sides is the same shape at a different scale. If you don’t know the number of sides but do know the angle at each corner, choose Work it out from the interior angle or Work it out from the exterior angle, and the calculator finds it.

The results include the area, the perimeter, the apothem and circumradius, the widths across flats and corners, every angle, and the number and lengths of the diagonals. You also get the incircle and circumcircle, and the mitre angle for building the shape from strips of timber. Tick the boxes to add the circles or diagonals to the drawing.

What makes a polygon regular?

A regular polygon has all its sides the same length and all its angles the same size. Equal sides alone are not enough: a rhombus has four equal sides but is not regular unless its angles are 90°. Every regular polygon fits perfectly inside a circle (the circumcircle, through every corner) and around a smaller one (the incircle, touching every side). Both circles share the polygon’s centre.

Names and angles of common regular polygons
SidesNameInterior angle
3Equilateral triangle60°
4Square90°
5Pentagon108°
6Hexagon120°
7Heptagon≈ 128.57°
8Octagon135°
9Nonagon (enneagon)140°
10Decagon144°
12Dodecagon150°
20Icosagon162°

Regular polygon formulas

P = ns · a = s ÷ (2 tan(180°/n)) · R = s ÷ (2 sin(180°/n)) · A = ½ × P × a

All the formulas come from one picture. Draw lines from the centre to every corner, and the polygon splits into n identical isosceles triangles. Each has a base of s, a central angle of 360°/n and a height equal to the apothem a. Half of one of these triangles is a right triangle with the angle 180°/n at the centre, so tan and sin give the apothem and circumradius. Adding up the triangles gives the area: n × ½ × s × a = ½ × perimeter × apothem.

A few shapes have tidy exact areas. An equilateral triangle is (√3/4)s², a square is s², a hexagon is (3√3/2)s², an octagon is 2(1 + √2)s² and a dodecagon is 3(2 + √3)s². The calculator shows these alongside the decimal answer.

Angles, and finding the number of sides

Walk round any convex polygon and you turn through one full circle, so the exterior angles always add up to 360°. In a regular polygon each one is 360° ÷ n, the same as the central angle. Each interior angle is 180° minus that, or (n − 2) × 180° ÷ n, and together they add up to (n − 2) × 180°.

Working backwards, a polygon with 165.6° corners has exterior angles of 14.4°, and 360 ÷ 14.4 = 25, so it has 25 sides. If the answer is not a whole number, no regular polygon has that angle. For 130° you would need 7.2 sides, so the calculator suggests the nearest real shapes: 7 sides at 128.57° or 8 sides at 135°.

Across flats and across corners

For shapes with an even number of sides, two widths matter. Across flats is the distance between opposite sides, twice the apothem. Across corners is the distance between opposite corners, twice the circumradius. Engineers size spanners and sockets across flats. An M8 hex nut is 13 mm across flats, but 15.01 mm across its corners, which is the space a socket or a recess has to clear. Polygons with an odd number of sides have a corner opposite every side, so they have neither width. Their height, from a corner to the opposite side, is R + a.

Diagonals

Each corner connects to every other corner except itself and its two neighbours, giving n − 3 diagonals per corner. Each diagonal is shared by two corners, so the total is n(n − 3)/2. That is 5 for a pentagon, 9 for a hexagon, 20 for an octagon and 54 for a dodecagon. They come in only ⌊n/2⌋ − 1 different lengths, given by 2R sin(k × 180°/n). For an even polygon, the longest ones pass through the centre and equal the width across corners.

Worked examples

An octagonal deck. With 1.2 m sides, the perimeter is 9.6 m and the area is 2(1 + √2) × 1.2² ≈ 6.95 m². Each corner is 135°, so the frame pieces meet with each end cut at 22.5° on a mitre saw.

A hexagonal gazebo 3.6 m across the corners. In a hexagon the circumradius equals the side, so each side is 1.8 m. The floor covers about 8.42 m², and it is 3.12 m across the flats. Use that width to check whether it fits between two fences.

A pentagon inside a circle. To mark a pentagon inside a circle with a 40 cm radius, step a chord of 2 × 40 × sin 36° ≈ 47.0 cm around the circle five times. The pentagon covers about 3,804 cm², roughly 76% of the circle.

A stop sign. A 30 in octagon (measured across the flats) has sides of about 12.4 in and a face area of about 746 in², or 5.2 ft².

Where regular polygons appear

  • Woodwork and building: planters, frames, gazebos, decks and window bays, where the mitre angle and the side length are what you cut.
  • Engineering: hex and square nuts and bolts, Allen keys and other tool profiles, all sized across flats.
  • Tiling and nature: only equilateral triangles, squares and hexagons tile a flat surface on their own, because only their interior angles divide 360° exactly. Bees use hexagons, the tiling shape that encloses the most area for a given wall length.
  • Signs and design: stop signs, logos, gaming dice and garden beds.
  • Approximating circles: a regular polygon with many sides is close to a circle. With 360 sides and a circumradius of 1, the area is 3.14143, already within 0.005% of π. Archimedes used the same idea with 96 sides to estimate π.

Common mistakes

  • Mixing up the apothem and the circumradius. The apothem goes to the middle of a side and is always the shorter of the two.
  • Measuring across corners when you meant across flats, or the other way round. For a hexagon, the two differ by about 15%.
  • Setting the saw to the interior angle. Each joint takes half of the turn at the corner. On a saw marked from 0°, that is 180° ÷ n, not the interior angle.
  • Using these formulas for irregular shapes. If the sides or angles differ, use the irregular polygon area calculator instead.

Frequently asked questions

How do I find the area of a regular polygon?

Multiply half the perimeter by the apothem: A = ½ × n × s × a. If you only know the side, use A = n × s² ÷ (4 tan(180°/n)). For an octagon with 1.2 m sides, that gives about 6.95 m².

How do I work out the number of sides from an angle?

Subtract the interior angle from 180° to get the exterior angle, then divide 360° by it. For corners of 165.6°, the exterior angle is 14.4° and there are 25 sides. If the answer is not a whole number, no regular polygon has that angle.

What is the difference between the apothem and the circumradius?

The apothem runs from the centre to the middle of a side and is the radius of the inscribed circle. The circumradius runs from the centre to a corner and is the radius of the circle through all the corners. For a hexagon, the circumradius equals the side length.

What angle do I cut to make a hexagonal or octagonal frame?

Each end is cut at 180° ÷ n from square: 30° for a hexagon and 22.5° for an octagon. Measured from the edge of the board, that is half the interior angle: 60° and 67.5°.

How many diagonals does a regular polygon have?

n(n − 3)/2. A hexagon has 9, an octagon 20 and a 20-sided icosagon 170. The calculator also lists how long the shortest and longest diagonals are.

Which regular polygons tile a floor without gaps?

Only equilateral triangles, squares and hexagons. Their interior angles (60°, 90° and 120°) divide 360° exactly, so copies fit together around every corner.

← All geometry calculators