🧮 Maths & science

Octagon calculator

Enter any one dimension and the rest follow. Works from side, width, diagonal or area.

Free · no signup Runs in your browser

Area—

    How do you calculate the area of an octagon?

    For a regular octagon, area equals 2 times 1 plus the square root of 2, multiplied by the side length squared — roughly 4.828 times the side squared. A regular octagon with 100 mm sides has an area of about 48,284 mm². Every interior angle is 135°, and each joint is mitred at 22.5°.

    Two different widths, and the confusion between them

    An octagon has two meaningful widths and they are not the same number. Across the flats is the distance between opposite parallel sides. Across the corners is the distance between opposite vertices, and it is about 8% larger.

    Ordering material or sizing an opening from the wrong one is the most common practical error with octagons. A gazebo described as three metres across could mean either, and the difference is roughly 230 mm.

    The calculator returns both, labelled, alongside the apothem — the perpendicular distance from centre to a flat, which is what you need for a compass layout.

    Cutting one from a square

    The practical woodworking question is almost never the area. It is how far in from each corner of a square blank to make the cut.

    For a square of side W, the setback along each edge is W minus the octagon side, divided by two. Mark that distance in from every corner along both edges, join the marks, and the four cuts give you a regular octagon.

    The calculator gives that setback directly, which saves working backwards from the side length every time.

    The formulas

    Everything scales from the side length.

    • perimeter = 8 × side
    • area = 2(1 + √2) × side² ≈ 4.828 × side²
    • width across flats = (1 + √2) × side ≈ 2.414 × side
    • width across corners = √(4 + 2√2) × side ≈ 2.613 × side
    • apothem = (1 + √2) × side ÷ 2
    • interior angle = 135° mitre angle = 22.5°

    The 22.5° mitre is half the 45° exterior turn between one side and the next, because two mitred ends meet at each joint. Cutting at 45° is the classic mistake and produces a square, not an octagon.

    These all assume a regular octagon with eight equal sides and eight equal angles. An irregular octagon has no single formula and has to be divided into triangles.

    Worked example: an octagonal deck from a 3 m square

    You want the largest regular octagon that fits inside a 3,000 mm square deck frame.

    1. Width across the flats3,000 mm
    2. Side = 3000 ÷ 2.4141,242.6 mm
    3. Corner setback = (3000 − 1242.6) ÷ 2878.7 mm
    4. Perimeter = 8 × 1242.69,940.9 mm
    5. Area7.46 m²

    Mark 879 mm in from each corner along both edges and cut across.

    That deck needs just under 10 m of edge boards and covers 7.46 m², against 9 m² for the full square — an octagon retains about 83% of the area of the square it fits inside.

    Where octagons turn up

    • Gazebo and deck frames, where the setback cut is the whole problem
    • Picnic tables and planter boxes built from a square blank
    • Stop signs, which are regular octagons by international convention
    • Newel posts and turned columns cut from square stock
    • Umbrella and canopy frames, which use the 22.5° geometry directly

    Common questions

    What angle do you cut for an octagon?

    22.5° on each mating edge. That is half the 45° turn between adjacent sides, because two cut ends meet at every joint. Cutting 45° gives a square instead — it is the most common mistake with octagonal frames.

    What is the interior angle of an octagon?

    135° for a regular octagon. The interior angles of any octagon sum to 1,080°, and dividing that by eight gives 135° when all angles are equal.

    How do I cut an octagon from a square?

    Measure in from each corner along both edges by the square width minus the octagon side, divided by two, then cut across between the marks. For a 3,000 mm square that setback is about 879 mm.

    What is the difference between the two octagon widths?

    Across the flats measures between opposite parallel sides and is about 2.414 times the side. Across the corners measures between opposite vertices and is about 2.613 times the side — roughly 8% larger. Confusing them is a common sizing error.

    Where these numbers come from

    Last verified 2026-08-01 The method on this page is checked against the sources above at least once a year. Spotted something out of date? Tell us and we will fix it.

    🧮 Maths and science calculators

    Homework tools that explain the method rather than just handing over an answer.

    See all 13 calculators in this section