ForHosting KIT · Math

Euler triangle OI distance calculator

With a circumradius of 10 and an inradius of 3, the circumcenter and the incenter are about 6.324555 apart, since the squared distance is 40. Enter the two radii and also learn whether they satisfy Euler's inequality. 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
Circumradius (R)
10
Inradius (r)
3
You get
Calculation mode
distance
Distance between centers (d)
6.324555
Squared distance between centers (d²)
40

free

One distance from two radii

Every triangle has a circumcenter O, the center of the circle through its three corners, and an incenter I, the center of the circle that touches its three sides. Euler's formula gives the distance between them from the two radii alone: the squared distance is R multiplied by the difference between R and 2r. So you take R, subtract twice r, multiply by R and take the square root. With a circumradius of 10 and an inradius of 3, that is 10 times 4, or 40, and the distance is about 6.324555. The individual sides and angles never enter the calculation.

What the inequality tells you

Because a square root needs a number that is not negative, the formula only works when R is at least 2r. That is Euler's inequality, and every real triangle satisfies it. The calculator checks it and flags any pair of radii that breaks it: if the circumradius is smaller than twice the inradius, no triangle can have those radii, which is a quick way to catch a measuring or typing mistake before you build anything. The boundary case, R exactly twice r, is the equilateral triangle, where O and I coincide and the distance is zero; it is accepted rather than lost to rounding noise.

Geometry verification

Confirm a triangle's O–I distance from R and r, or test whether a radius pair satisfies Euler's inequality before constructing the triangle.

What inputs are required?

Positive numbers R (circumradius) and r (inradius). decimals (integer 0–10, default 6) and mode (default "distance") are optional.

What does Euler's triangle formula say?

It gives the distance between the circumcenter and the incenter from the two radii alone: the squared distance is R times the difference between R and 2r. With R at 10 and r at 3, the square is 40 and the distance about 6.324555.

What is Euler's inequality R ≥ 2r?

It says the circumradius is always at least twice the inradius. The distance is a real number only when this holds, so the calculator flags any pair of radii where R is smaller than 2r.

When is the distance between O and I zero?

When R is exactly twice r, which happens in an equilateral triangle: the circumcenter and the incenter are the same point. The calculator accepts this boundary case instead of losing it to tiny rounding noise.

What if the circumradius is less than twice the inradius?

Then no triangle can have those two radii, because the number under the square root would be negative. The result shows that Euler's inequality fails, a sign that the pair of radii is impossible.

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/math/euler-triangle-formula

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/math/euler-triangle-formula \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"R":10,"r":3}'
{
  "R": 10,
  "r": 3
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.euler_triangle_formula",
  "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.

Give a triangle's circumradius R and inradius r to compute the circumcenter–incenter distance via Euler's formula d = √(R(R − 2r)), with a euler_ok flag that reports when R ≥ 2r fails. Free in-browser or API from $0.002.

Euler's O–I distance

You send R and r as positive numbers; mode defaults to "distance" and is currently the only supported mode. The formula is notable because it depends only on the two radii, not on the individual side lengths or angles, and it makes Euler's inequality R ≥ 2r immediate: the distance is real exactly when that inequality holds. This endpoint evaluates Euler's triangle formula, which gives the distance d between a triangle's circumcenter O and incenter I purely from its circumradius R and inradius r: d² = R(R − 2r), so d = √(R(R − 2r)). The response echoes mode, R, and r and adds d_squared, d, and a boolean euler_ok. For the worked example R=10, r=3 the tool returns d_squared=40 and d≈6.324555, since 10·(10−6)=40.

The euler_ok flag and its edge case

The Euler inequality R ≥ 2r is checked explicitly with a small tolerance (R ≥ 2r − 1e-12) so that the boundary case R = 2r — the equilateral triangle, where O and I coincide and d = 0 — is accepted rather than lost to floating-point noise. When R < 2r the radii cannot belong to any real triangle, so instead of throwing, the endpoint returns euler_ok:false with both d and d_squared set to null: a clean, machine-readable signal that the pair is geometrically impossible. When the inequality holds, d² = R(R − 2r) is computed, clamped at zero before the square root to guard the exact boundary against rounding, and both d_squared and d are returned with euler_ok:true. This lets you feed candidate (R, r) pairs and filter valid triangles in bulk without catching exceptions.

Inputs, rounding and validation

Inputs are validated before any arithmetic: the body must be an object, both R and r must be finite numbers strictly greater than zero, and decimals must be an integer from 0 to 10, otherwise a typed invalid_input error names the bad field. Any mode other than "distance" is rejected as invalid_input. The two numeric outputs d and d_squared are rounded with a half-up rule applied once to each raw value, and decimals defaults to 6; importantly, d_squared is rounded from R(R − 2r) directly, not from the rounded d, so squaring the reported d will not exactly reproduce the reported d_squared at low precision. This is the forward direction only — it computes d from R and r and does not reconstruct a triangle from d.

Teaching Euler's theorem

Demonstrate d² = R(R − 2r) and R ≥ 2r, including the equilateral limit where d = 0 when R = 2r.

Filtering radius pairs

Screen large lists of (R, r) candidates, using euler_ok:false to discard geometrically impossible pairs without exception handling.

What does it compute?

The distance d between a triangle's circumcenter and incenter using Euler's formula d = √(R(R − 2r)), returning d and d_squared.

What if R is less than 2r?

No real triangle exists, so the response sets euler_ok:false and returns d and d_squared as null instead of throwing.

What happens at R = 2r?

That is the equilateral case: the circumcenter and incenter coincide, so d = 0 and euler_ok is true, thanks to a small tolerance on the check.

Is it free?

Yes in the browser as a tier A widget. The API costs $0.002 per successful call; failed tasks are not charged.

Read the full KIT documentation →