ForHosting KIT · Math

Isosceles triangle height calculator

Enter the base and one of the equal sides of an isosceles triangle and get its height: a base of 10 with sides of 13 rises 12 units to the apex. Use it for a roof ridge, an A-frame or the next step towards the area. 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
Base
10
Side
13
You get
Height
12

Because the altitude to the base bisects it, the problem reduces to a single Pythagorean step: h = sqrt(side² − (base/2)²). One call replaces the scratch work every time the number is needed inside a larger computation.

Why the height is the number people actually need

The height of an isosceles triangle is rarely the final answer — it is the piece that unlocks everything else. Area is base times height over two, so without the height there is no area. The base angles come from arctan of height over half the base.

Roof pitches, gable ends, A-frame structures, tent profiles and truss geometry are all isosceles triangles in disguise, and in every one of them the height is the quantity a builder measures, a drawing specifies, or a cut list depends on. Given the base and the equal side, the height follows from a right triangle hiding inside the figure: the altitude splits the base in half and forms a right triangle whose hypotenuse is the equal side.

This capability does that one step deterministically, so the calling code never re-derives it, never re-rounds it inconsistently, and never silently returns NaN when the inputs cannot form a triangle at all.

How the computation works and what it rejects

The input is validated before any arithmetic happens. Both the base and the side must be positive finite numbers. Then the triangle inequality for this shape is enforced: the two equal sides together must be strictly longer than the base, that is, twice the side must be greater than the base.

When the inputs are valid, half the base is squared, subtracted from the side squared, and the square root of the difference is the height. The result is rounded half-up to the requested number of decimal places, six by default and at most ten, so the same inputs always produce byte-identical output on any machine.

Where it fits in a workflow

Call it anywhere a height is needed from dimensions you already have: generating a gable roof outline in a CAD script, checking whether a folded bracket clears an opening, sizing the mast of a symmetrical kite, or verifying homework-grade geometry inside an educational tool. The output is deliberately minimal, one field named height, so it composes cleanly: feed it straight into an area multiplication, an angle computation, or a drawing routine without unwrapping nested structures.

Size a gable roof or A-frame

From the span and the rafter length, get the ridge height to check clearances and draw the profile to scale.

Drive an area or angle computation

Feed the returned height into base*height/2 for the area or into an arctangent for the base angles, without re-deriving the formula.

Validate geometry in a teaching tool

Reject impossible triangles with a clear error instead of a NaN, so students see why equal sides must exceed half the base.

What inputs does it take?

The base length and the length of the two equal sides, as positive numbers, plus an optional decimals field controlling rounding (0-10, default 6).

What formula is used?

The altitude bisects the base, so height = sqrt(side² − (base/2)²), the Pythagorean theorem applied to either half of the triangle.

Does it convert units?

No. Base and side must be in the same unit, and the height comes back in that unit. Convert before calling if needed.

Is anything stored?

No. The numbers are processed in memory and discarded; only the height is returned.

What if the equal sides are too short for the base?

You get a clear message instead of a meaningless result. The two equal sides together must be longer than the base, so twice the side has to exceed the base for the apex to rise above it.

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-triangle-height

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-triangle-height \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"base":10,"side":13}'
{
  "base": 10,
  "side": 13
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.isosceles_triangle_height",
  "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 isosceles triangle height API takes the base of an isosceles triangle and the length of its two equal sides, and returns the height — the perpendicular distance from the base to the apex.

How the computation works and what it rejects

If that condition fails — an equal side shorter than half the base — no such triangle exists and the request is rejected with an invalid_input error that spells out the violated condition, rather than returning the square root of a negative number.

Where it fits in a workflow

It runs on the edge with nothing stored, and the exact same module that serves the API runs free in the browser on this page — paste a base and a side, see the height, and only pay the $0.002 per request when you automate the call from your own code. Because validation and the triangle inequality are enforced before any arithmetic, the API doubles as a guard: an automated pipeline that feeds it dimensions from a drawing or a parts list finds out immediately, with a clear message, when a combination of base and side cannot form a real triangle, instead of discovering the problem later as a malformed render or a mis-cut part.

What does it cost?

$0.002 per request via the API. It is also free to run in your browser on this page.

What happens when the sides are too short?

If twice the side is not greater than the base, no such triangle exists; the request fails with an invalid_input error and is not charged.

Read the full KIT documentation →