Regular Polygon Calculator
Enter the number of sides and side length of a regular polygon and get its area and perimeter instantly.
What this calculator does
Enter the number of sides n and the side length s of a regular polygon — all sides equal, all angles equal — and the calculator returns the area in units² and the perimeter in units. At the defaults n = 6 and s = 2 it reports an area of 10.39 and a perimeter of 12 for a hexagon. The same formula covers everything from the equilateral triangle (n = 3) to a shape so many-sided it is practically a circle (the calculator accepts up to n = 100).
The area and perimeter formulas
The formula works by slicing the polygon into n identical isosceles triangles that meet at the centre. Each wedge has a base equal to s and a central angle of 360° ÷ n; the half-angle π/n (in radians) is why the tangent appears. Each triangle’s height is the apothem, s ÷ (2 × tan(π/n)), and n copies of ½ × base × height collapse into the single expression above. The perimeter is the easy part: n equal sides, so P = n × s.
Two special cases are worth memorising. The hexagon simplifies to A = (3√3 ÷ 2) × s² ≈ 2.598 × s² because tan(π/6) = 1/√3 exactly. The square needs no trigonometry at all: tan(π/4) = 1, so A = 4 × s² ÷ 4 = s², the ordinary square formula recovered from the general one.
Worked example at the defaults
For a hexagon with s = 2: tan(π/6) = tan(30°) ≈ 0.57735, so the denominator is 4 × 0.57735 = 2.3094. The numerator is n × s² = 6 × 4 = 24. Dividing gives A = 24 ÷ 2.3094 ≈ 10.39 units², and the perimeter is 6 × 2 = 12 units. Cross-check with the hexagon shortcut: 2.598 × 4 = 10.39. The dimensions also check out — a length squared gives units², and n × s stays in plain units.
Angles and areas by number of sides
| Sides n | Interior angle | Exterior angle | Area at s = 2 |
|---|---|---|---|
| 3 (triangle) | 60° | 120° | 1.73 |
| 4 (square) | 90° | 90° | 4.00 |
| 5 (pentagon) | 108° | 72° | 6.88 |
| 6 (hexagon) | 120° | 60° | 10.39 |
| 8 (octagon) | 135° | 45° | 19.31 |
| 10 (decagon) | 144° | 36° | 30.78 |
| 12 (dodecagon) | 150° | 30° | 44.79 |
Two patterns run through the table. The interior angle climbs toward 180° — computed as (n − 2) × 180° ÷ n — while each exterior angle is exactly 360° ÷ n and shrinks toward zero. And at a fixed side length of 2, the area keeps growing with n, because extra sides wrap more surface around the same edge length.
Why exterior angles always sum to 360°
Walk once around any polygon and turn at every corner. By the time you return to your starting point facing your original direction, you have turned through exactly one full circle: 360°. For a regular polygon every turn is identical, so each exterior angle is 360° ÷ n — 60° for a hexagon, 45° for an octagon, 1.8° for the n = 100 case. The interior angle is simply 180° minus that turn, which reproduces the (n − 2) × 180° ÷ n formula with no memorising.
As the sides grow, the polygon becomes a circle
Push n upward at a fixed perimeter and the polygon melts into a circle, which is the shape with the greatest area for any given perimeter. At s = 2, a polygon with n = 100 has a perimeter of 200, an area of 100 ÷ tan(1.8°) ≈ 3,182 units² — and the true circle with circumference 200 has radius 200 ÷ (2π) ≈ 31.83 and area π × 31.83² ≈ 3,183 units². The gap is under 0.1%. Archimedes used exactly this squeeze, bounding the circle between inscribed and circumscribed polygons, to pin down π to a few decimals two thousand years before calculators.
Common mistakes
- Feeding degrees into a radians-mode function. tan(π/6) and tan(30°) are the same angle but only if your tool agrees on the unit. Mixing modes turns the hexagon’s clean 10.39 into nonsense.
- Using it on an irregular shape. All sides and all angles must be equal. A lopsided hexagon lot needs the triangle-splitting method, not this formula.
- Confusing the apothem with the radius. The apothem runs to the midpoint of a side (1.73 for the default hexagon); the circumradius runs to a vertex (2 for the default hexagon).
- Forgetting the diagonal measure. Hardware stores size hex nuts across the flats — twice the apothem, 3.46 at the defaults — not by side length, so a 12 mm nut is not a 12 mm side.
Where regular polygons matter
- Honeycomb. The hexagon is one of only three regular polygons that tile a plane (with the triangle and square) and it encloses the most area per unit of edge, which is why bees build hexagonal cells.
- Fasteners. Hex and square bolt heads are specified by the polygon’s across-the-flats dimension, tied to the apothem.
- Gazebos and floor plans. Octagonal rooms, yurts and rotundas are laid out by side length, and this formula converts a builder’s s directly into floor area.
- Game boards and crystals. Hexagonal grid tiles and naturally faceted crystals all size by edge length.
For the individual members of the family, the dedicated pentagon calculator and equilateral triangle calculator give the same numbers with shape-specific commentary; this page is the general machine behind both.
Frequently asked questions
How do I find the area of a regular polygon?
Use A = n × s² ÷ (4 × tan(π/n)). For a hexagon (n = 6) with side 2, the area is 24 ÷ 2.3094 ≈ 10.39 square units.
What is the interior angle of a regular polygon?
Compute (n − 2) × 180° ÷ n. A hexagon has 120° interior angles, an octagon 135°, and a dodecagon (n = 12) has 150°.
What do the exterior angles sum to?
Always 360°, for any polygon. Each exterior angle of a regular polygon is 360° ÷ n: 60° for a hexagon, 45° for an octagon, 1.8° for n = 100.
How do I find the perimeter?
Multiply the number of sides by the side length: P = n × s. A hexagon with side 2 has a perimeter of 12 units.
Why is the hexagon the most efficient tiling shape?
Among the three regular polygons that tile a plane, the hexagon encloses the most area per unit of perimeter — 2.598 × s² against the triangle’s 0.433 × s² and the square’s 1.0 × s². Bees exploit this to spend the least wax on the most cell volume.
Should the tangent use degrees or radians?
The formula is written with π/n, which is radians. In degrees the same argument is 180° ÷ n: for a hexagon, π/6 ≈ 0.5236 rad equals 30°, and tan of either is 0.57735.
What is the apothem of a regular polygon?
The distance from the centre to the midpoint of a side: s ÷ (2 × tan(π/n)). For the default hexagon it is 2 ÷ 1.1547 ≈ 1.73, and ½ × 12 × 1.73 ≈ 10.39 confirms the area.
How big is a regular octagon with side 2?
Its perimeter is 16 and its area is 8 ÷ tan(22.5°) ≈ 8 ÷ 0.41421 ≈ 19.31 square units — a standard stop sign is this shape at roughly s = 12 inches.
What happens as n gets very large?
The polygon approaches a circle. At s = 2 and n = 100, the area is about 3,182 square units, within 0.1% of the circle whose circumference is 200, and the interior angle of 176.4° nearly reaches 180°.
Can I use this formula for an irregular polygon?
No. All sides and angles must be equal. For an irregular shape, split it into triangles and sum their areas instead.
Method and sources
- Regular polygon area: A = n·s² / (4·tan(π/n)), perimeter P = n·s.