Enter either the side length of a regular octagon or its width across the flats, and the calculator returns the area, the perimeter, the side length, the width across the flats and the width across the corners. It suits octagonal tables, gazebos, decks, windows and floor tiles, where you often know the overall width rather than the side.
Octagon Calculator
Regular octagon area, perimeter, width across flats and diagonal — from side length or width across flats.
The octagon formulas
A regular octagon has eight equal sides and eight equal angles. For a side length s:
Area = 2 × (1 + √2) × s² ≈ 4.8284 × s²
Perimeter = 8 × s
Width across flats = s × (1 + √2) ≈ 2.4142 × s
Width across corners = s × √(4 + 2√2) ≈ 2.6131 × s
Side from width = width across flats ÷ (1 + √2)
Where:
- The width across flats is the distance between two opposite flat sides.
- The width across corners is the distance between two opposite corners, the longest straight line across the shape.
Where the formula comes from
Picture the octagon as a square with its four corners cut off as right triangles. The square has side W, the width across flats. Each cut-off triangle has legs of s ÷ √2, so W = s + 2 × (s ÷ √2) = s × (1 + √2). The area is the square minus the four triangles, which simplifies to 2(1 + √2) s².
Worked examples
Example 1: from the side length
A regular octagon with a side of 5:
Area = 4.8284 × 25 = 120.71
Perimeter = 8 × 5 = 40
Width across flats = 5 × 2.4142 = 12.071
Width across corners = 5 × 2.6131 = 13.066
Example 2: from the width, an octagonal table
A table top that is 48 in across the flats:
Side = 48 ÷ 2.4142 = 19.88 in
Perimeter = 8 × 19.88 = 159.1 in
Area = 4.8284 × 19.88² = 1,908.6 in², or 13.25 ft²
Area from the width alone is W² × 0.8284, so 48² × 0.8284 = 1,908.6 in², which agrees.
Example 3: a gazebo floor
An octagonal gazebo with 8 ft sides:
Area = 4.8284 × 64 = 309.0 ft²
Perimeter = 64 ft
Width across flats = 8 × 2.4142 = 19.31 ft
Width across corners = 8 × 2.6131 = 20.90 ft
Example 4: cutting an octagon from a square
To make an octagon from a 10 ft square, the width across flats is 10 ft:
Side = 10 ÷ 2.4142 = 4.142 ft
Cut each corner back by 4.142 ÷ √2 = 2.929 ft along both edges
Area = 0.8284 × 100 = 82.84 ft²
The octagon keeps about 83 percent of the square, and the four offcut triangles make up the other 17 percent.
Which mode to use
Side length mode
Use it when you know one edge, for example from a plan or a pattern. It gives all four results.
Width mode
Use it when you measure across the shape, which is common for a table, a window or a floor. The calculator converts the width to a side length first and then finds the area and perimeter from the side.
Measuring the width correctly
Measure between two opposite flat sides, not between two opposite corners. The width across corners is about 8 percent larger than the width across flats, so mixing them up gives a visible error. If you measured corner to corner, divide by 2.6131 to find the side.
What the calculator assumes
The formulas apply to a regular octagon with all sides and angles equal. For an irregular eight-sided shape, split it into triangles or enter its corner coordinates in a polygon or irregular shape calculator.
Frequently asked questions
What is the formula for the area of a regular octagon?
Area = 2 × (1 + √2) × s², which is about 4.8284 times the square of the side. An octagon with a side of 5 has an area of 120.71.
How do I find the side of an octagon from its width?
Divide the width across the flats by 1 + √2, about 2.4142. A table 48 in across the flats has a side of 19.88 in.
What is the difference between width across flats and across corners?
Across flats is the distance between two opposite flat sides. Across corners is the distance between two opposite corners, which is about 8 percent longer.
How do I cut an octagon from a square?
Cut each corner back by the side length divided by √2. For a 10 ft square the side is 4.142 ft and each corner cut is 2.929 ft along both edges.
What is the perimeter of an octagon?
Eight times the side length. A side of 5 gives a perimeter of 40.
Does the calculator work for irregular octagons?
No. It assumes all sides and angles are equal. For an irregular shape, use a polygon area calculator with the corner coordinates.




