What this calculator does
Get every measurement of an even-sided shape, such as a pentagon or octagon, from the number of sides and one length. A regular polygon has every side the same length and every corner the same angle. Think of an equilateral triangle, a square, or a regular pentagon, hexagon or octagon. Because the shape is so even, the number of sides plus one measurement is all you need. From those two facts you can work out everything else, from the area to the length of each diagonal.
Enter how many sides the polygon has. Then choose which measurement you know (the side, the perimeter, the area, the apothem or the circumradius) and type its value. The calculator gives you the area, side, perimeter, apothem, circumradius, and the interior and exterior angles. It also shows the angle sum, the number of diagonals, the height and the diagonal lengths. For each one, it shows the right-triangle math behind it.
Where it's used
Why this math matters outside the classroom:
- Gazebo floors. A builder laying a regular octagonal deck with 2 m sides finds its area as 16 × 2.4142 ÷ 2, about 19.31 square meters.
- Cutting trim angles. A woodworker making a hexagonal frame cuts each joint at half the 60° exterior angle, setting the miter saw to 30°.
- Signs and tiles. A sign maker sizing a regular pentagon to fit a 10 cm radius circle uses side = 2 × 10 × sin 36°, about 11.76 cm.
- Approximating pi. Students repeat Archimedes' idea by computing the perimeter of a 96-sided polygon around a circle to squeeze π between two bounds.
- Nut and bolt sizes. A mechanic knows a hexagonal nut 10 mm across its flats is 10 ÷ cos 30°, about 11.55 mm, across its corners.
Grade level and standards: Grades 9–10; Common Core State Standards for Mathematics HSG.SRT.C.8. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.
How to use it
- Enter the number of sides, from 3 up to 1,000.
- Choose the measurement you already know from the list.
- Type its value in any length unit, or that unit squared for an area.
- Read the area (or the side, if you started from the area) and the other measurements below it. Open the working to follow the formulas.
What the inputs mean
- Number of sides (n)
- 3 for a triangle, 5 for a pentagon, 8 for an octagon, and so on.
- I know the
- The apothem is the distance from the center straight to the middle of a side. It's also the radius of the largest circle that fits inside. The circumradius is the distance from the center to a corner. It's the radius of the circle that passes through every corner.
- Its value
- Use one unit throughout. If the side is in centimeters, the area comes out in square centimeters.
Formula and method
interior angle = (n − 2) × 180° ÷ n, exterior angle = 360° ÷ n apothem a = s ÷ (2 tan(180°/n)) circumradius R = s ÷ (2 sin(180°/n)) perimeter P = n × s area = P × a ÷ 2 = n × s² ÷ (4 tan(180°/n)) number of diagonals = n(n − 3) ÷ 2, diagonal skipping k − 1 corners = 2R sin(k × 180°/n)
In these formulas, n is the number of sides and s is the length of one side. a is the apothem (center to the middle of a side), R is the circumradius (center to a corner) and P is the perimeter. k is how many corners a diagonal steps around the shape. k = 2 skips one corner and gives the shortest diagonal.
Join the center to every corner and the polygon splits into n matching triangles, each with two equal sides. Each has the side s as its base, the apothem as its height, and an angle of 360°/n at the center. Cut one down the middle and you get a right triangle. It has an angle of 180°/n at the center. The apothem is the side next to that angle, half the side is the side across from it, and the circumradius is the long slanted side. Tangent and sine (the standard right-triangle ratios) of 180°/n then give the apothem and the circumradius.
Each of those triangles has an area of s × a ÷ 2, and there are n of them. That gives area = n × s × a ÷ 2, or the perimeter times the apothem divided by 2. The interior angle comes from the angle sum. You can cut any n-sided polygon into n − 2 triangles from one corner, so its angles total (n − 2) × 180°.
When you know a measurement other than the side, the calculator first turns it back into the side. It divides the perimeter by n, or rearranges one of the formulas above. Then it works forward from the side.
Worked example
A gazebo has a regular octagonal floor with sides 2 meters long. How much floor area is there, and at what angle do the boards meet at each corner?
- With n = 8 sides, the angle at the center of each half-triangle is 180° ÷ 8 = 22.5°.
- Apothem: a = 2 ÷ (2 × tan 22.5°) = 2.4142 meters. That's the distance from the center to the middle of each side.
- Perimeter: P = 8 × 2 = 16 meters.
- Area: 16 × 2.4142 ÷ 2 = 19.3137 square meters.
- Interior angle: (8 − 2) × 180° ÷ 8 = 135°. So each pair of floor edges meets at 135°, and each outside turn is 45°.
Result: The floor covers about 19.3137 square meters. The circumradius is 2.6131 meters, the shortest diagonal 3.6955 meters and the longest (corner to opposite corner) 5.2263 meters.
Understanding the result
For a fixed side length, adding sides makes the polygon larger and rounder. The interior angle climbs toward 180°, and the shape gets closer and closer to a circle whose radius is the circumradius. With 1,000 sides and a circumradius of 1, the area is within 0.0001 of π.
The apothem is always shorter than the circumradius, and the gap shrinks as n grows. With an even number of sides, the height across the polygon is twice the apothem. With an odd number, the height runs from a side to the opposite corner. It equals the apothem plus the circumradius.
Assumptions and limitations
- The polygon is regular: all sides equal and all interior angles equal. It's also convex, meaning no corner points inward.
- Angles are in degrees. Lengths share one unit, and the area is in that unit squared.
- Irregular polygons, where sides or angles differ, need a different method. One option is the shoelace formula, which works from the corners' coordinates.
- Star polygons (like a pentagram) are not covered.
Frequently asked questions
What is the interior angle of a regular hexagon or octagon?
Use (n − 2) × 180° ÷ n, where n is the number of sides. A hexagon has (6 − 2) × 180° ÷ 6 = 120° at each corner. An octagon has (8 − 2) × 180° ÷ 8 = 135°. The exterior angles are 60° and 45°.
How do I find the area of a regular polygon from the apothem?
Multiply the perimeter by the apothem and halve it. If you only know the apothem, first find the side as s = 2a × tan(180°/n). For example, a square with apothem 2 has side 4, perimeter 16 and area 16 × 2 ÷ 2 = 16.
How many diagonals does a polygon have?
n(n − 3) ÷ 2. Each corner connects to n − 3 others by a diagonal: every corner except itself and its two neighbors. Each diagonal gets counted from both ends, so you halve the total. A pentagon has 5, a hexagon 9 and an octagon 20.
Why is a pentagon's diagonal related to the golden ratio?
In a regular pentagon, the diagonal divided by the side is exactly (1 + √5) ÷ 2, about 1.618. That number is the golden ratio. With a side of 6 the diagonal is about 9.7082, which this calculator reports as the shortest diagonal.
How this calculator is checked
Method: Standard regular-polygon relations from right-triangle trigonometry (apothem, circumradius, area = perimeter × apothem ÷ 2), the polygon angle sum (n − 2) × 180°, and the diagonal count n(n − 3) ÷ 2. Checked against the closed forms for the square, equilateral triangle, regular pentagon, hexagon and octagon. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this Regular Polygon Calculator on your own website or blog for free. Paste this code where you want it to appear: