ForHosting KIT · Math

Octagon apothem calculator

A regular octagon with sides of 2 has an apothem of exactly 1 + √2, about 2.414213562373: the distance from its center to the middle of every side. Enter the side length to get this inner radius for fittings, clearances and plates. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Side
2
You get
Apothem
2.4142135624

The apothem of a regular octagon is the perpendicular distance from the centre to the middle of any side—the radius of the inscribed circle, also called the inradius. Architects, metalworkers, stop-sign fabricators, floor-tile installers, and game developers often know the edge length of an octagonal plate, column, table top, or map cell and need that inner radius for clearances, inscribed fittings, or area checks. This octagon apothem calculator accepts a single positive side length, applies the closed form a equals half the side times one plus the square root of two, and returns the apothem together with a short formula string you can show next to the answer.

What the apothem of a regular octagon is and why the formula is closed form

A regular octagon has eight equal sides and eight equal interior angles of one hundred thirty-five degrees. Connecting the centre to every vertex partitions the octagon into eight congruent isosceles triangles, each with two radii and a base equal to the side length s. Dropping a perpendicular from the centre to a side bisects that side and creates a right triangle whose opposite half-side is s over two and whose adjacent leg is the apothem a.

The central half-angle is π over eight (twenty-two and a half degrees), so tan of that angle equals (s/2) divided by a, which rearranges to a equals s divided by two times the tangent of π over eight. Because tan of π over eight simplifies exactly to the square root of two minus one, the expression collapses to the compact radical form a equals (s/2) times (1 plus the square root of two).

That length is also the inradius: the radius of the unique circle that touches all eight sides from the inside. It is not the same as the circumradius (vertex radius), which for a regular octagon is (s/2) times (1 plus the square root of two) times the secant relationship—more commonly written R equals (s/2) times the square root of four plus two times the square root of two, or equivalently R equals a times the square root of one plus tan squared of π over eight.

Students and CAD users sometimes confuse apothem with circumradius; this tool reports only the apothem so the search intent for octagon apothem calculator stays crisp. Equivalent trigonometry confirms the identity: a equals s times cosine of twenty-two and a half degrees over two sine of the same half-angle, or the general regular n-gon apothem formula with n equals eight. All expressions are algebraically identical for a perfect octagon, and the implementation uses the single radical form for a deterministic floating-point path.

What you enter, what you get and what is refused

Zero and negative side lengths also fail, because a geometric edge length must be strictly greater than zero—there is no meaningful apothem for a collapsed or inverted octagon. On success the body echoes side, returns apothem rounded to twelve decimal places for stable goldens across runtimes, and includes a formula string restating a equals (s/2)·(1+√2) as the inradius of a regular octagon.

Example: side equals two yields apothem equal to one plus the square root of two, about two point four one four two one three five six two three seven three. Side equals one yields apothem equal to half of one plus the square root of two, about one point two zero seven one zero six seven eight one one eight seven. Units are not converted: if you pass centimetres you get centimetres, if you pass inches you get inches.

Where an octagon apothem calculator earns its keep

Architecture and civil detailing use regular octagonal columns, planters, and openings; knowing the inradius from the published edge length sets centre-to-flat clearances and inscribed circular fittings such as pipes or handrails. Manufacturing of stop signs, octagonal stock, gazebo floor plates, and decorative blanks needs the same distance when specifying inscribed-circle gauges or when nesting oct blanks inside circular stock.

Game and map engines that place octagonal rooms or isometric props often store side length as the canonical size and must convert to apothem when aligning flat-to-flat spacing (flat-to-flat equals twice the apothem). Keep requests small, pin the rounded apothem in tests, and you get reproducible inradii for homework, LMS plugins, CAD macros, and edge workers without standing up a general polygon library when the only figure that matters is the regular octagon.

Octagonal plate and column clearances

Convert a published octagon edge length into the inradius so fittings, holes, and centre marks sit correctly relative to each flat side.

Classroom and exam checks

Let students enter side length s and verify a=(s/2)·(1+√2) against textbook half-angle or tan(π/8) methods without calculator slip-ups.

What happens if the side length is zero or negative?

Side length must be strictly greater than zero; non-positive values are not billed.

Is the apothem the same as the circumradius?

No. The apothem is the centre-to-side (inradius) distance (s/2)·(1+√2). The circumradius (centre to vertex) is larger: (s/2)·√(4+2√2).

Which units does the calculator use?

None are assumed. Output uses the same unit as the input side length—millimetres in, millimetres out.

Why does the apothem formula contain 1 + √2?

The general rule is the side divided by twice the tangent of π/8. That tangent equals √2 − 1 exactly, so the expression simplifies to half the side times 1 + √2, which is the compact form used here.

Can I get the octagon's area from the apothem?

Not from this calculator, which returns the apothem only. You can finish it yourself: the area of a regular octagon is four times the side times the apothem, the same as 2(1 + √2) times the side squared.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/geom/octagon-apothem

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/geom/octagon-apothem \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"side":2}'
{
  "side": 2
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.octagon_apothem",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Non-positive or non-finite side values fail with invalid_input instead of a silent NaN.

Input contract, response shape, and validation rules

POST a JSON body with one required field: side, a finite positive number giving the edge length of the regular octagon. The value may arrive as a JSON number or as a numeric string; empty strings, missing fields, non-numeric text, NaN, and Infinity fail with invalid_input naming the field. Pair the response with your own area formula if needed—area of a regular octagon is two times (1 plus √2) times s squared, or equivalently four times s times a—this endpoint derives the apothem only and does not emit area, perimeter, or drawings. Failed validation does not consume prepaid balance; successful parse-tier calls use the published base price.

CAD macros and fabricator gauges

Derive flat-to-flat spacing (twice the apothem) from a side-based octagon size for nest layouts, stop-sign blanks, and CNC fixtures.

How do I find the apothem of a regular octagon from the side length?

Send a finite positive number side. The API returns apothem a = (s/2)·(1+√2), the inradius of the regular octagon, plus a short formula string.

What does the octagon apothem calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →