Quick answer
A regular octagon with side s has area 2(1 + √2)s² ≈ 4.828427 s², perimeter 8s, interior angle 135° and apothem s ÷ (2 tan 22.5°). For s = 2: area 19.3137, perimeter 16, apothem 2.414214.
Enter the side length of a regular octagon. The calculator returns area, perimeter, interior angle and apothem.
Related tools: Area Calculator: Area of common two-dimensional shapes. Right Triangle Calculator: Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter. Pythagorean Theorem Calculator: Find the hypotenuse or a missing leg of a right triangle.
How to use the Octagon Calculator
- Enter side length (above 0).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Side length | A number | > 0 |
Formula and method
Formula
A = n s² ÷ (4 tan(π/n)); interior angle = (n − 2) × 180° ÷ n
IEEE-754 double precision; shown to at most 6 decimal places.
Regular polygon formulas; apothem = s ÷ (2 tan(π/n)).
Worked examples
This example is verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Side length = 2.
| Result | Value |
|---|---|
| Area | 19.313708 |
| Perimeter | 16 |
| Interior angle | 135° |
| Apothem | 2.414214 |
The first line is the headline result (area). Below it the octagon Calculator lists perimeter, interior angle and apothem, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
Worked example
Eight triangles of base 2 and height 2.414214 have area 2.414214 each, totalling 19.3137. An octagon also equals a square of side s(1 + √2) = 4.828 with four corner triangles cut off.
Where octagons appear
Stop signs, gazebos and umbrellas are regular octagons. For a stop sign measured across the flats (the apothem times two), width w = s(1 + √2); a 30 inch sign has a side of 12.43 inches.
Perimeter and cost
Perimeter is 8s, so edging an octagonal deck with 2 m sides needs 16 m of trim, plus waste at the mitred corners.
How the result changes with side length
Holding every other input at the first worked example, this table changes only side length. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Side length | Area | Perimeter | Interior angle |
|---|---|---|---|
| 1 | 4.828427 | 8 | 135° |
| 2 | 19.313708 | 16 | 135° |
| 4 | 77.254834 | 32 | 135° |
| 8 | 309.019336 | 64 | 135° |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Side length: entering "0" shows "Side length must be greater than 0." beside that field and no result.
Choosing between the Octagon Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Area Calculator](/math/area-calculator/) | shape and a | Area |
| [Right Triangle Calculator](/math/right-triangle-calculator/) | leg a and leg b | Hypotenuse c |
| [Pythagorean Theorem Calculator](/math/pythagorean-theorem-calculator/) | find, leg a and other side | Hypotenuse c |
| [Triangle Calculator](/math/triangle-calculator/) | side a, side b and side c | Area |
| [Circle Calculator](/math/circle-calculator/) | i know the and value | Area |
Background: geometry measurements
Geometry results carry units that depend on the quantity: a perimeter or length is in linear units such as cm, an area or surface area is in square units (cm²) and a volume is in cubic units (cm³). Use one length unit for every input, because the calculator multiplies the numbers as given.
Flat (2D) shapes have an area and a perimeter; solids (3D) have a surface area and a volume. Two familiar checks: a circle of radius r has area πr² and circumference 2πr, and a sphere has volume (4/3)πr³ and surface area 4πr².
Assumptions and limitations
- Regular polygons only
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for side length to confirm this.
Frequently asked questions
What is each interior angle?
135 degrees, and each exterior angle is 45 degrees.
How many diagonals does an octagon have?
Twenty, because 8 × 5 ÷ 2 = 20.
What is the area for s = 1?
About 4.8284, which is 2(1 + √2).
What does the Octagon Calculator calculate?
Area, perimeter and angles of a regular 8-sided polygon. It returns Area, Perimeter, Interior angle and Apothem.
What formula does the Octagon Calculator use?
A = n s² ÷ (4 tan(π/n)); interior angle = (n − 2) × 180° ÷ n. Regular polygon formulas; apothem = s ÷ (2 tan(π/n)).
What do I need to enter in the octagon Calculator?
You enter Side length.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Regular polygons only.
What is an example of a octagon result?
With side length 2, the area is 19.313708.
Related calculators
- Area Calculator — Area of common two-dimensional shapes.
- Right Triangle Calculator — Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter.
- Pythagorean Theorem Calculator — Find the hypotenuse or a missing leg of a right triangle.
- Triangle Calculator — Area, perimeter, angles and type of a triangle from its three sides.
- Circle Calculator — Radius, diameter, circumference and area of a circle from any one of them.
- Circumference Calculator — Circumference of a circle.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.