Polygon Calculator
A regular hexagon with side 6 has an area of 93.5307 square units. The calculator gets there from n a^2 / (4 tan(pi/n)) = 6 x 36 / (4 tan 30 degrees), with a perimeter of 36 and interior angles of 120 degrees. The same formulas work for any regular polygon from 3 sides upward.
| Area | |
| Perimeter | |
| Apothem | |
| Circumradius | |
| Each interior angle | |
| Sum of interior angles | |
| Each exterior angle | |
| Diagonals |
All calculations run in your browser, and nothing you type is uploaded.
Enter the number of sides and one side length to get the area, perimeter, angles, apothem, circumradius, and diagonals of a regular polygon.
Key takeaways
- A regular polygon is fully described by its side count and side length
- Area = n a^2 / (4 tan(180 degrees / n))
- Interior angles total (n - 2) x 180 degrees
- The formulas only fit regular shapes with equal sides and angles
On this page
What this polygon calculator works out
This tool handles regular polygons: shapes where every side has the same length and every corner has the same angle. Enter the number of sides n and one side length a, and it returns the area, perimeter, apothem, circumradius, each interior angle, the sum of the interior angles, each exterior angle, and the number of diagonals. A regular hexagon with a side of 6 cm, for example, has an area of 93.5307 cm², a perimeter of 36 cm, and interior angles of 120°.
Regular polygons are the ones you can describe with just two numbers, which is why the calculator works this way. Tiles, bolts, road signs, and game boards use regular shapes, so a side length and a count of sides are usually all you know and all you need. If your shape has sides of different lengths, the regular-polygon formulas do not apply, and you would want a general area tool instead.
The unit of the answer follows the unit you type. A side of 6 inches gives an area in square inches, a perimeter in inches, and the apothem and circumradius in inches too. Angles come out in degrees.
The formulas behind the results
Everything comes from two right triangles drawn from the center to a side. The apothem is the distance from the center to the middle of a side: a / (2 tan(π/n)). The circumradius is the distance from the center to a corner: a / (2 sin(π/n)). The area follows by splitting the polygon into n triangles and adding them up: A = n a² / (4 tan(π/n)).
The angle formulas do not involve the side length at all. The interior angles sum to (n - 2) × 180°, so each one measures (n - 2) × 180° / n. Each exterior angle is 360° / n, because walking the perimeter turns a full circle one corner at a time. A regular pentagon has interior angles of 108° and exterior angles of 72°; a regular octagon has 135° and 45°. The diagonal count is n(n - 3) / 2, since each of the n corners connects to n - 3 non-adjacent corners and each diagonal gets counted twice.
Wolfram MathWorld collects the same set in its regular polygon entry.| Quantity | Formula for a regular polygon |
|---|---|
| Interior angle | (n - 2) x 180 degrees / n |
| Exterior angle | 360 degrees / n |
| Perimeter | n x a |
| Apothem | a / (2 tan(180 degrees / n)) |
| Circumradius | a / (2 sin(180 degrees / n)) |
| Area | perimeter x apothem / 2, the same as n a^2 / (4 tan(180 degrees / n)) |
| Diagonals | n (n - 3) / 2 |
Hexagon, pentagon, and octagon examples
Example 1: a hexagonal table top with sides of 6 cm. The area is 6 × 6² / (4 tan(30°)) = 216 / 2.3094 = 93.5307 cm². The perimeter is 36 cm, the apothem is 6 / (2 tan(30°)) = 5.1962 cm, and the circumradius is 6 / (2 sin(30°)) = 6 cm, so the largest round tabletop blank that can be cut from it has a 12 cm diameter.
Example 2: an octagonal gazebo floor with sides of 5 ft. The area is 8 × 5² / (4 tan(22.5°)) = 200 / 1.6569 = 120.7107 ft². The perimeter is 40 ft, each interior angle is 135°, and the apothem is 5 / (2 tan(22.5°)) = 6.0355 ft.
| Sides | Side length | Area | Perimeter | Interior angle |
|---|---|---|---|---|
| 3 | 10 | 43.3013 | 30 | 60° |
| 4 | 10 | 100.0000 | 40 | 90° |
| 5 | 10 | 172.0477 | 50 | 108° |
| 6 | 10 | 259.8076 | 60 | 120° |
| 7 | 10 | 363.3912 | 70 | 128.57° |
| 8 | 10 | 482.8427 | 80 | 135° |
One more check: a stop sign is a regular octagon. A real one measures 30 inches across the flats, which is twice the apothem, so its side length is 2 × 15 × tan(22.5°) = 12.4264 inches and its area is about 745.6 square inches. That is the apothem formula run in reverse, from apothem back to side length.
Running the polygon calculator step by step
Count the sides and measure one side, then type both in. The results update as you type. Use the same unit for the side length throughout, and the area and lengths come back in that unit. If you know the apothem or the circumradius instead of a side length, you can still get there: side length = 2 × apothem × tan(180° / n), or side length = 2 × circumradius × sin(180° / n). Compute the side length first, then enter it.
The calculator accepts any whole number of sides from 3 upward, so triangles, squares, pentagons, hexagons, and shapes like a 12-sided dodecagon all work. Watch the side count when measuring a physical object: bolts are commonly 6-sided, but some fasteners have 8 or 12 flats, and counting one flat too many throws the area off by roughly 10 to 20%.
Everything runs in your browser and nothing is uploaded, so you can measure, adjust, and re-enter numbers as often as the project needs.
Regular versus irregular polygons
A polygon is regular only when all sides match and all angles match. A rectangle is not regular unless it is a square. A rhombus is not regular unless it is a square. An isosceles triangle is not regular unless it is equilateral. If your shape fails either test, the formulas above give wrong answers, often badly: applying the hexagon formula to a stretched hexagon with the same side length can miss the true area by a wide margin.
Irregular shapes need a different toolkit. Any polygon can be split into triangles and summed, which is how a general area calculator works, or you can use the shoelace formula on the corner coordinates. Angle sums still behave the same way for any simple polygon: the interior angles always total (n - 2) × 180° whether or not the shape is regular, so a five-sided room of any shape has interior angles summing to 540°.
Perimeter is the one measurement that needs no regularity at all. Add the side lengths for any polygon, regular or not. The circumradius and apothem, by contrast, only make sense for regular shapes, because they assume every corner sits the same distance from the center.
Where regular polygons show up
Hexagons tile without gaps, which is why honeycombs, hex tile floors, and nut and bolt heads are 6-sided. Octagons appear in stop signs, gazebos, and umbrella frames. Pentagons show up in home plate on a baseball field and in the pattern of soccer ball panels, mixed with regular hexagons. Game designers use d4, d6, d8, d12, and d20 dice, all regular polyhedra built from regular polygon faces.
The angle facts explain many of these choices. Only triangles, squares, and hexagons tile a plane with a single regular shape, because their interior angles of 60°, 90°, and 120° divide 360° evenly. A pentagon's 108° does not divide 360°, so pentagon-only tilings leave gaps, which is why pentagon tiles always pair with other shapes. When a project needs a fitted shape, check the angle first and the area second.
For related shapes, the triangle calculator handles 3-sided cases in depth, the equilateral triangle calculator covers the regular 3-gon specifically, and the area calculator extends to circles, ellipses, and composite shapes. The perimeter calculator adds arbitrary side lengths for irregular boundaries.
Wikipedia's regular polygon article has the full table of named polygons from 3 to 20 sides.Regular polygon families at a glance
Because side count and side length pin down everything else, whole families of regular polygons can be tabulated once and reused. The table below fixes the side at 1 and lists what each formula gives. Scale any column by the square of your side for area, or linearly for the apothem, and the figure above traces how the interior angle climbs with n.
| Sides n | Interior angle | Area with side 1 | Apothem with side 1 | Diagonals |
|---|---|---|---|---|
| 3 | 60.00 degrees | 0.4330 | 0.2887 | 0 |
| 4 | 90.00 degrees | 1.0000 | 0.5000 | 2 |
| 5 | 108.00 degrees | 1.7205 | 0.6882 | 5 |
| 6 | 120.00 degrees | 2.5981 | 0.8660 | 9 |
| 7 | 128.57 degrees | 3.6339 | 1.0383 | 14 |
| 8 | 135.00 degrees | 4.8284 | 1.2071 | 20 |
| 9 | 140.00 degrees | 6.1818 | 1.3737 | 27 |
| 10 | 144.00 degrees | 7.6942 | 1.5388 | 35 |
Reading down the area column shows a pattern worth knowing: as n grows with the side held fixed, the polygon fills more and more of the circle it inscribes, so the area drifts toward pi, about 3.1416, the area of the unit circle. That is exactly how Archimedes cornered the value of pi, by pushing the side count up and watching the polygon hug the circle.
Frequently asked questions
How many sides can this polygon calculator handle?
Any whole number from 3 to 999. Triangles through dodecagons are the common cases, but a 20-sided or 100-sided regular polygon works the same way.
What is the interior angle of a regular hexagon?
120°. The formula is (n - 2) × 180° / n, so for n = 6: (6 - 2) × 180° / 6 = 120°. All six interior angles measure 120°.
How do I find the area of a regular octagon with side 5?
Use A = n a² / (4 tan(180° / n)). For n = 8 and a = 5: 8 × 25 / (4 tan(22.5°)) = 200 / 1.6569 = 120.7107 square units.
What makes a polygon regular?
All sides equal in length and all interior angles equal. A square is regular; a rectangle that is not a square is not. A shape fails if either test fails.
What is the apothem of a polygon?
The distance from the center to the midpoint of any side. For a regular polygon it equals a / (2 tan(180° / n)). A hexagon with side 6 has an apothem of 5.1962.
What is the sum of the interior angles of an n-sided polygon?
(n - 2) × 180°. A triangle totals 180°, a quadrilateral 360°, a pentagon 540°, and a decagon 1440°.
Can this tool handle irregular polygons?
No. It assumes equal sides and equal angles. Split an irregular shape into triangles and add their areas, or use coordinates with the shoelace formula.
What is the exterior angle of a regular polygon?
360° / n. A pentagon has exterior angles of 72°, and an octagon has 45°. Interior and exterior angles at a corner always add to 180°.
What is the difference between the apothem and the circumradius?
The apothem runs from the center to a side midpoint, the circumradius from the center to a corner. The circumradius is always longer: a / (2 sin(180° / n)) versus a / (2 tan(180° / n)).
Which regular polygon has interior angles of 150 degrees?
Solve (n - 2) × 180° / n = 150° and n = 12, the regular dodecagon. Its exterior angles are 30° each.
How many diagonals does a polygon have?
n(n - 3) / 2. A pentagon has 5, a hexagon has 9, and a decagon has 35.
Why does the area grow as sides are added at the same side length?
The shape fills more of its circumscribed circle. At a side length of 10, the area rises from 43.30 (triangle) to 100.00 (square) to 482.84 (octagon), approaching the circle as n climbs.
Spotted a wrong number or a broken result?
More Math tools
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.