Layout

Polygon calculator

An octagon with 4 ft sides measures 9 ft 7-7/8 in across the flats and 10 ft 5-7/16 in across the corners, and every joint is cut at 22.5°. Enter the number of sides and one side length, and this gives the miter per corner, the width across the flats and the corners, the perimeter, the angles, and the area, in feet, inches, and sixteenths. Built for octagon decks, gazebos, hexagon tables, and planters.

Sides leaning in or out, like a planter? Box miter calculator

Updated

Sides from 3 to 100; 8 for an octagon, 6 for a hexagon. Enter the side the way your tape reads it: 4 ft, 17-3/8, or 2 ft 6-1/4 in. Lengths round once to the nearest 1/16 in.

Miter per corner
22.5°
Across the flats
9 ft 7-7/8 in
Across the corners
10 ft 5-7/16 in
Perimeter
32 ft
Center to a flat (apothem)
4 ft 9-15/16 in
Center to a corner (circumradius)
5 ft 2-11/16 in
Interior angle
135°
Exterior angle
45°
Sum of interior angles
1080°
Area
77.25 sq ft (7.18 sq m)
App StoreGoogle Play
Free to download. 7-day trial of everything.

How the math works

A regular polygon splits into identical triangles that meet at the center. The distance from the center to the middle of a side is the apothem, side ÷ (2 × tan(180° ÷ sides)). The distance from the center to a corner is the circumradius, side ÷ (2 × sin(180° ÷ sides)).

With an even number of sides, opposite sides are parallel: the width across the flats is twice the apothem, and the width across the corners is twice the circumradius. With an odd number, a corner faces a flat, so the calculator gives the height from a corner to the opposite flat, the apothem plus the circumradius. The widest span of an odd polygon runs between its two farthest corners and is wider than that height (for a triangle it is the full side), so check a deck footprint or a table blank against both.

Each joint closes the exterior angle, 360° ÷ sides, and each of the two mating pieces takes half of it. That half, 180° ÷ sides, is the miter saw setting: 22.5° for an octagon, 30° for a hexagon. The calculator keeps the side as an exact count of sixty-fourths and rounds each length once to the nearest 1/16 in, the same way the CutOnce app does.

A worked example: an octagon deck with 4 ft sides

Eight 4 ft sides, the size of a small octagon deck or gazebo floor. This is one of the app's own test cases.

Miter per corner22.5°180° ÷ 8
Across the flats9 ft 7-7/8 in2 × 48 in ÷ (2 × tan 22.5°)
Across the corners10 ft 5-7/16 in2 × 48 in ÷ (2 × sin 22.5°)
Perimeter32 ft8 × 4 ft
Center to a flat4 ft 9-15/16 inhalf the width across the flats
Center to a corner5 ft 2-11/16 inhalf the width across the corners
Area77.25 sq ft8 × 4² ÷ (4 × tan 22.5°)

Lay out the center, then mark the corners on a circle of the circumradius. A tape stretched across the flats should read the same in all four directions; if one reads long, a side is long.

A second example: a hexagon tabletop with 12 in sides

Six 12 in sides measure 1 ft 8-13/16 in across the flats and 2 ft across the corners, exactly twice the side, because a hexagon's corner radius equals its side. Each joint is cut at 30°.

Polygon chart: miters and widths per inch of side

Multiply the side length by the factor to get the width. For an octagon with 10 in sides, across the flats is 10 × 2.4142 = 24.142 in.

SidesMiterInterior angleAcross flats ×Across corners ×Corner to flat ×
3 Triangle60°60°0.8660
4 Square45°90°1.00001.4142
5 Pentagon36°108°1.5388
6 Hexagon30°120°1.73212.0000
7 Heptagon25.71°128.57°2.1906
8 Octagon22.5°135°2.41422.6131
9 Nonagon20°140°2.8356
10 Decagon18°144°3.07773.2361
12 Dodecagon15°150°3.73213.8637
16 16-gon11.25°157.5°5.02735.1258

What the app adds

This page takes the side in feet, inches, and fractions. The app also takes metric sides, switches the area among square feet, inches, yards, and meters, draws the polygon with its dimensions, rounds to your tape's resolution down to 1/64 in, and prints the whole layout as a PDF.

How we verify this math

Common questions

What angle do I cut for an octagon?
Set the miter saw to 22.5° for each end of every piece. Eight joints close 360°, so each joint is 45°, split evenly between the two pieces that meet there. A hexagon is 30° per cut, a pentagon 36°, and a twelve-sided frame 15°.
How wide is an octagon with 4 ft sides?
9 ft 7-7/8 in across the flats and 10 ft 5-7/16 in across the corners. Across the flats is the side times 2.4142; across the corners is the side times 2.6131. The area is 77.25 square feet.
How do I find the side length from the width of an octagon?
Multiply the width across the flats by 0.4142, the tangent of 22.5°. An octagon 9 ft 7-7/8 in across the flats has 4 ft sides. For other polygons, multiply the width across the flats by tan(180° ÷ sides), then check the result in the calculator.
What is the difference between across the flats and across the corners?
Across the flats runs from the middle of one side to the middle of the opposite side; across the corners runs from one corner to the opposite corner. A wrench size on a hex nut is across the flats. For a deck or a table, across the corners is the overall size you need room for.
Does this work for a polygon with an odd number of sides?
Yes. An odd-sided polygon has a corner opposite each flat, so there is no across-the-flats or across-the-corners pair. The calculator gives the height from a corner to the opposite flat instead, the apothem plus the circumradius. The widest span runs between the two farthest corners and is wider than that height, so allow for both when sizing material.

Lay it out from one side

CutOnce solves the polygon like this page, then draws it, switches units, and prints the layout as a PDF, with no signal needed.

Free to download, with a 7-day trial of everything. This page gives the cuts and widths; the app keeps them with the job.

App StoreGoogle Play

See also