MathsGeometry

Regular Polygon
calculator.

One size and the number of sides fix every other measure of a regular hexagon or octagon.

How it's worked out

Every side of a regular polygon has the same length, and every corner has the same angle. Join the center to each corner and you get n matching triangles, where n is the number of sides. Half of one triangle is a right triangle, and its angle at the center is 180° over n. That one right triangle gives all the formulas below.

Two distances from the center matter. The apothem, a, runs to the middle of a side. The circumradius, R, runs to a corner. With side s, they are:

a\displaystyle a=s2tan⁡(180∘/n)\displaystyle {}= \frac{s}{2\tan(180^\circ / n)}
R\displaystyle R=s2sin⁡(180∘/n)\displaystyle {}= \frac{s}{2\sin(180^\circ / n)}

Each triangle has base s and height a, so the area is half the perimeter times the apothem.

A\displaystyle A=nsa2\displaystyle {}= \frac{n\,s\,a}{2}

The angles depend only on n. The inside angles add up to (n − 2) × 180°, because a polygon splits into n − 2 triangles from one corner. The outside angle is what is left of a straight line.

inside\displaystyle \text{inside}=(n−2)×180∘n\displaystyle {}= \frac{(n-2) \times 180^\circ}{n}
outside\displaystyle \text{outside}=360∘n\displaystyle {}= \frac{360^\circ}{n}
Inside angle and area with sides of 1
PolygonInside angleArea
Triangle (3)60°0.433
Square (4)90°1
Pentagon (5)108°1.7205
Hexagon (6)120°2.5981
Octagon (8)135°4.8284
Decagon (10)144°7.6942
Dodecagon (12)150°11.1962
The two center distances with sides of 1
PolygonApothemCircumradius
Triangle (3)0.28870.5774
Square (4)0.50.7071
Pentagon (5)0.68820.8507
Hexagon (6)0.8661
Octagon (8)1.20711.3066
Decagon (10)1.53881.618
Dodecagon (12)1.8661.9319

Scale these by your side length, and scale the area by the square of it.

Worked examples

Dana sizes a sign blank measured across its flats

A stop-sign shaped blank is 30 in across its flat sides, so the distance from the center to a side is 15 in. Each side comes to 12.43 in, and the face covers 745.6 in². Corner to corner, it needs 32.47 in of sheet, which is more than the 30 in across the flats.

Open this example in the tool

Ravi matches a wrench to a hex bolt

A 13 mm wrench grips the flats of a bolt head, so half of that, 6.5 mm, is the distance from center to side. Each side is 7.51 mm. Across the corners, the head measures 15.01 mm, which is the clearance a socket needs to swing around it.

Open this example in the tool

Tom cuts the boards for an octagonal frame

A frame with 48 ft of edge needs eight boards of 6 ft each. The inside angle is 135°, so each board end is cut 22.5° off square. Two ends meet to turn the frame by the 45° outside angle, and eight of those turns bring it back to the start.

Open this example in the tool

Reading your result

Across flats or across corners. With an even number of sides, opposite sides are parallel, so the width across flats is twice the apothem and the width across corners is twice R. A hexagon with 10 cm sides is 17.32 cm across its flats and 20 cm across its corners.

An odd number of sides has a height instead. Each corner faces a side, so there is no "across flats". A pentagon inside a circle of radius 10 stands 18.09 from corner to opposite side, less than the circle's width of 20. Its sides step around that circle at 11.76.

The exact form. With a whole-number side on a triangle, square, hexagon, octagon or dodecagon, the area has an exact form with a square root. The decimal beside it is rounded, and the root is the one a geometry class usually wants.

More sides, closer to a circle. Inside a circle of radius 1, 6 sides cover 82.7% of the circle and 96 sides cover 99.93%. Archimedes used a 96-sided polygon to show that π lies between 310713\frac{10}{71} and 3173\frac{1}{7}. With 1,000 sides, the area here is 3.141572, close to π, yet a polygon always stays a little short of the circle around it.

Common mistakes

  • Mixing up the two radii. Measuring to a corner gives R, and measuring to the middle of a side gives the apothem. For a hexagon they differ by about 15%, and in a sheet-metal cut that is the difference between fitting and scrap.
  • Cutting board ends at the inside angle. A board end is cut at half the outside angle measured from square, not at the inside angle. Set the miter saw to the 22.5° figure for an octagon, not 135°.
  • Using these formulas on an unequal shape. A shape with equal sides and unequal angles, or a star, needs other formulas. This tool assumes a convex shape with all corners on one circle.

Questions people ask

Divide 180 by the number of sides. An octagon needs 22.5 degrees on each end and a hexagon needs 30, measured from a square cut. Check your saw's scale, since some read from a different zero.

Sources