ForHosting KIT · Developer Utilities

Regular polygon apothem calculator from circumradius

This regular polygon apothem calculator finds the shortest distance from the center of a regular polygon to any side.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter the number of sides and the circumradius, which is the distance from the center to a vertex. The calculator applies the cosine relationship directly and returns the apothem as the inradius because those two measurements are identical for every regular polygon. Results can be rounded from zero to twelve decimal places, making the tool useful for quick geometry checks, construction layouts, diagrams, classroom exercises, and repeatable software calculations.

Understand the apothem and circumradius relationship

A regular polygon has equal sides, equal interior angles, and a well-defined center. Draw a line from the center to a vertex and another line from the center perpendicular to the neighboring side. Together with half of that side, these lines form a right triangle. The center-to-vertex line is the circumradius and acts as the hypotenuse. The perpendicular center-to-side line is the apothem. At the center, the angle inside this half-triangle is π divided by the number of sides. Cosine relates the adjacent side to the hypotenuse, so the calculation is apothem = circumradius × cos(π / number_of_sides). The apothem is also the polygon's inradius: it is the radius of the largest circle centered within the polygon that touches every side. This calculator returns both names so results remain clear whether your source material discusses polygon geometry, an inscribed circle, fabrication clearances, or architectural dimensions. No side length, perimeter, or area is required for this particular relationship.

Enter valid measurements and interpret the result

Set number_of_sides to a whole number from 3 through 1,000,000. Three describes an equilateral triangle, four a square, six a regular hexagon, and larger values increasingly resemble a circle. Set circumradius to a finite positive number no greater than 1,000,000,000,000,000. The calculation does not assign a physical unit, so the output uses the same unit as the circumradius: meters in produces meters out, inches in produces inches out, and pixels in produces pixels out. The optional decimals setting controls display rounding from zero through twelve places and defaults to six. Both apothem and inradius contain the same rounded result. The response also repeats number_of_sides and circumradius, which helps automated workflows associate an answer with its inputs. Rounding is applied only after evaluating the cosine formula, preserving the best available precision during calculation. Keep more decimal places for downstream calculations and round more aggressively only for presentation, labeling, or tolerances that genuinely need fewer digits.

Check behavior across different regular polygons

The formula behaves predictably across the supported range. For a square, cos(π/4) is about 0.7071, so the apothem is roughly seventy-one percent of the circumradius. For a regular hexagon, cos(π/6) is about 0.8660, placing each side farther from the center relative to the vertices. As the number of sides increases, π divided by that count becomes smaller and its cosine approaches one. The apothem therefore approaches the circumradius, matching the intuition that a many-sided regular polygon increasingly resembles its circumscribed circle. A valid result is always positive and never greater than the supplied circumradius. If a workflow produces the opposite relationship, check whether the supplied value was actually a diameter, side length, or apothem rather than a circumradius. The algorithm is deterministic, uses no network access, and depends only on the submitted numbers. Identical inputs produce identical JSON results, which makes the capability suitable for test fixtures, spreadsheets, CAD helpers, educational systems, and server-side validation where reproducibility matters.

Fabrication and layout

Find the center-to-flat distance of a regular plate, nut, sign, or enclosure when the center-to-corner radius is known.

Geometry education

Check exercises that connect right-triangle trigonometry, circumcircles, incircles, and regular polygon measurements.

Graphics and CAD automation

Convert a vertex radius into an inradius for collision bounds, labels, guides, or repeated parametric designs.

What formula does the calculator use?

It uses apothem = circumradius × cos(π / number_of_sides).

Are the apothem and inradius different?

Not for a regular polygon. The apothem equals the radius of the centered circle tangent to every side, so both returned fields have the same value.

Which units should I use?

Use any consistent length unit. The apothem and inradius are returned in the same unit as the circumradius.

Can I enter a diameter instead of a circumradius?

No. Divide the diameter by two first, then submit that value as circumradius.

How much does an API calculation cost?

Each API request starts at $0.002. The browser calculator can run the same deterministic calculation locally.

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/trig/regular-polygon-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/trig/regular-polygon-apothem \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"number_of_sides":6,"circumradius":10}'
{
  "number_of_sides": 6,
  "circumradius": 10
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "trig.regular_polygon_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.

Read the full KIT documentation →