Regular Polygon Calculator (any number of sides)

Calculate area, perimeter, apothem, and circumradius of any regular n-sided polygon from its side length.
Works from triangle (n=3) to 100+.

Polygon Properties

A regular n-sided polygon has n equal sides and n equal angles. Triangle, square, pentagon, hexagon, heptagon, octagon, nonagon, decagon, and on up to shapes with so many sides they are indistinguishable from a circle.

Perimeter: P = n × s

Interior angle (per vertex): angle = (n − 2) × 180° / n

Apothem (inradius, centre to mid-side): r = s / (2 × tan(π/n))

Circumradius (center to vertex): R = s / (2 × sin(π/n))

Area: A = (n × s² / 4) × cot(π/n) = (1/2) × P × r

The area formula has a clean interpretation: a regular polygon’s area equals half its perimeter times its apothem. This generalizes the triangle formula (½ × base × height) to any regular polygon.

Reference values for common polygons (s = 1 unit):

Sides Name Area Perimeter Apothem Interior angle
3 Triangle (equilateral) 0.4330 3.000 0.289 60°
4 Square 1.000 4.000 0.500 90°
5 Pentagon 1.720 5.000 0.688 108°
6 Hexagon 2.598 6.000 0.866 120°
7 Heptagon 3.634 7.000 1.038 128.57°
8 Octagon 4.828 8.000 1.207 135°
9 Nonagon 6.182 9.000 1.374 140°
10 Decagon 7.694 10.000 1.539 144°
12 Dodecagon 11.196 12.000 1.866 150°
100 Hectogon 795.51 100.000 15.91 176.4°

As n increases, the polygon approaches a circle. For very large n with side length 1, the circumscribed circle has radius ≈ s × n / (2π).

Where this matters in real life:

  • Gazebo and pavilion floors. Most are octagonal, hexagonal, or pentagonal. The same formulas size them all.
  • Architectural cupolas and rooftop ornaments. Often heptagonal (7 sides) or nonagonal (9 sides) for visual variety.
  • Coin design. Many world coins are heptagonal (Britain’s 50p), pentagonal (Australian commemorative), or polygonal for tactile distinction.
  • Geodesic dome panels. A geodesic dome’s panels are triangles, but the projected ground footprint is often a regular polygon (10, 12, 15 sides).
  • Stop signs are octagonal, Yield signs are triangular, Children Crossing signs are pentagon-shaped in some countries.

Worked example: building a heptagonal (7-sided) gazebo

You want a unique 7-sided gazebo with 4-ft sides. Perimeter = 28 ft of edge. Area = 3.634 × 16 = 58.1 sq ft of floor space. Apothem = 1.038 × 4 = 4.15 ft (the distance from center to the middle of each wall). Interior angle = 128.57° (each corner is slightly more “open” than the 120° of a hexagon).

Worked example: designing a polygonal flower bed

You want a 9-sided (nonagonal) decorative bed with 3-ft sides. P = 27 ft of bed border. A = 6.182 × 9 = 55.6 sq ft. Apothem = 1.374 × 3 = 4.12 ft (so a central plant fits within 4 ft of any edge).

The limit. As n grows the polygon closes in on a circle from both sides at once, and the numbers are startling. At n = 1000 the polygon fills 99.9993% of the circle drawn through its corners, and it overshoots the circle drawn inside it by only 0.0003%. Squeezed between those two, π is pinned to five decimal places.

That squeeze is exactly Archimedes’ method. He worked up to 96 sides by hand and reported π as lying between 223/71 and 22/7, which is 3.1408 to 3.1429. His bracket was correct and it held as the standard value in Europe for centuries.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.