# Octagon Calculator

URL: https://speedycalculator.com/calculators/math/octagon/
Last updated: 2026-10-30

> The octagon calculator finds the perimeter, area, long, medium and short diagonals, circumradius and inradius of a regular octagon from its side.

## Inputs

- Side a (cm, m, mm, in, ft, yd, km, mi)

## Results

- Area
- Perimeter
- Long diagonal
- Medium diagonal (width across flats)
- Short diagonal
- Circumradius
- Inradius

## Formula

```
A = 2(1 + √2)a²,  P = 8a
Long diagonal a√(4 + 2√2),  medium a(1 + √2),  short a√(2 + √2)
```

## Explanation

Stop signs, gazebos, umbrellas and many floor tiles are octagons. A regular octagon is a square with its corners cut off at 45°, which is how carpenters build octagonal frames.

### How to use the Octagon Calculator

- **Side a**
- Every result field is editable: type into **Area** or any other result and **Side a** plus every other field update to match.

Results update as you type, and everything is calculated in your browser.

### How it works

Enter the side length or type into any result. The circumradius is half the long diagonal and the inradius half the medium diagonal (the width across flats).

### What each result means

- **Area** = 2×(1 + sqrt(2))×[Side a]^2
- **Perimeter** = 8×[Side a]
- **Long diagonal** = [Side a]×sqrt(4 + 2×sqrt(2))
- **Medium diagonal (width across flats)** = [Side a]×(1 + sqrt(2))
- **Short diagonal** = [Side a]×sqrt(2 + sqrt(2))
- **Circumradius** = [Side a]×sqrt(4 + 2×sqrt(2))÷2
- **Inradius** = [Side a]×(1 + sqrt(2))÷2

### Example values

How the main result changes when **Side a** changes and everything else stays at the example values above:

Side a (cm)Area (cm²)2.530.17773.7567.89985120.71076.25188.61047.5271.59910482.8427

## Worked example

Inputs — Side a: 5 cm.

Results — **Area = 120.710678 cm²**; Perimeter = 40 cm; Long diagonal = 13.06563 cm; Medium diagonal (width across flats) = 12.071068 cm; Short diagonal = 9.238795 cm; Circumradius = 6.532815 cm; Inradius = 6.035534 cm.

## Key terms

- **Across flats**: The distance between opposite parallel sides.

## FAQ

**What is the interior angle of an octagon?**
135°.

**How do I cut an octagon from a square?**
Cut each corner off at 45°, removing a/√2 along each edge.

**How many diagonals does an octagon have?**
20.

**How wide is an octagon across the flats?**
a(1 + √2) ≈ 2.414a.


## Sources

- [OpenStax – Prealgebra 2e](https://openstax.org/details/books/prealgebra-2e)
- [OpenStax – Algebra and Trigonometry 2e](https://openstax.org/details/books/algebra-and-trigonometry-2e)
- [Wolfram MathWorld – Octagon](https://mathworld.wolfram.com/Octagon.html)
