ForHosting KIT · Math

Isosceles right triangle calculator

Give one side of a right triangle with two equal legs and get the side you are missing: a leg of 5 gives a hypotenuse of 7.0710678119, because the sides always keep the ratio 1 : 1 : √2. It works from the hypotenuse too. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

Runs in your browser. Free, unlimited — your data never leaves this page.

The isosceles right triangle calculator answers one focused question: you know one side of a right triangle whose two legs are equal, and you need the side you do not know. Tell the tool whether your known length is a leg or the hypotenuse, and it returns the unknown side together with the complete side pair. From a leg, the unknown hypotenuse is the leg times the square root of two; from the hypotenuse, each unknown leg is the hypotenuse divided by the square root of two. All arithmetic is deterministic floating-point math with no network access and no randomness, so the same request always yields the same result.

When this single-side solver is the right tool

Use this calculator whenever a problem states an isosceles right triangle and hands you exactly one side. Students meet the setup constantly: a square cut along its diagonal is two isosceles right triangles, so 'the diagonal of a square measures ten, find its side' is precisely a known-hypotenuse request, and 'a leg is five, find the hypotenuse' is the complementary direction. Carpenters and makers use the same conversion when squaring a frame with diagonal measurements or cutting forty-five-degree braces.

If your triangle is a different special case, such as a thirty-sixty-ninety figure, or a general right triangle with two unequal legs, use the dedicated tools for those instead—this solver intentionally handles only the equal-leg case and says so when the inputs do not fit.

Square diagonal conversions

A square's diagonal is the hypotenuse of an isosceles right triangle; convert a known diagonal to the side length, or a known side to the diagonal, in one call.

Homework and answer keys

Complete special-right-triangle exercises that give a single leg or hypotenuse, and check the unknown side against printed answer keys without hand root-two arithmetic.

What does the isosceles right triangle calculator cost?

It is free in your browser on this page.

What is an isosceles right triangle?

A right triangle whose two legs are equal, with angles 45°, 45°, and 90°. Its sides always follow the fixed ratio 1 : 1 : √2.

I know the hypotenuse. How do I get a leg?

Each leg equals the hypotenuse divided by the square root of two.

What happens if the known side is zero or negative?

Side lengths must be strictly positive finite numbers; zero or negative values cannot form a real triangle.

Do I need to provide both sides?

No. One known side is enough because the ratio is fixed: provide a leg to get the hypotenuse, or the hypotenuse to get each leg.

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/isosceles-right-triangle

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/isosceles-right-triangle \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"known_side":5}'
{
  "known_side": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.isosceles_right_triangle",
  "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.

The known side must be strictly positive and finite: zero, negatives, Infinity, and NaN are rejected with an invalid_input error instead of a silent wrong answer. Run it free in the browser on this page, or call the API at $0.002 per successful request when you need the same reproducible answer inside a script or automated pipeline.

What the calculator expects and what it returns

An isosceles right triangle has one right angle of ninety degrees and two equal acute angles of forty-five degrees, which forces the two legs to be equal and locks every side into the ratio one to one to root two. That rigidity is why a single known side is enough to determine the unknown one. The ratio string and a short formula line restate the exact relations used. The input contract asks for two things: known_side, the positive length you already have, and known_kind, which declares whether that length is a leg or the hypotenuse. If you omit known_kind the tool assumes leg, because most real-world givens—one side of a square, one equal edge of a brace—are legs. The response echoes what you supplied, names the unknown side kind, and gives its value, plus the resolved leg and hypotenuse so callers can use either without recomputing. The validation is deliberately strict: a missing known_side, a zero, a negative number, Infinity, NaN, or an unrecognized known_kind all raise invalid_input with a message that names the problem.

How the unknown side is computed

The mathematics is a single constant multiplication or division. When known_kind is leg and the known side L is positive, the unknown hypotenuse is L times the square root of two, taken from the double-precision Math.SQRT2 constant. When known_kind is hypotenuse and the known side H is positive, each unknown leg is H divided by the square root of two. Those two identities come straight from the Pythagorean theorem with both legs equal: the hypotenuse squared equals two times the leg squared, so the hypotenuse is the leg times root two. For convenience the solver accepts several aliases—side, value, or length for known_side, kind for known_kind, and decimals or dp for precision—so form posts, spreadsheets, and hand-written JSON all work without renaming keys.

When this single-side solver is the right tool

Developers call the API version to seed deterministic test vectors for geometry libraries, to answer programming-challenge statements that demand an unknown side from a known one, or to normalize user input that may arrive as a leg or as a diagonal without branching logic of their own. On this page the computation runs free in your browser; through the API each successful evaluation costs $0.002, invalid inputs are rejected before any charge, and nothing you send is stored after the response returns.

Deterministic test fixtures

Generate reproducible leg-and-hypotenuse pairs for unit tests, contest validators, and CI assertions with a strict contract that refuses non-positive lengths.

Read the full KIT documentation →