Isosceles triangle side calculator
Enter the base and the height of an isosceles triangle and get the length of its two equal sides: a base of 6 and a height of 4 give sides of 5, the 3-4-5 right triangle mirrored. Any positive base and height work. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Base
- 6
- Height
- 4
- Side
- 5
Enter the base of an isosceles triangle and its height, and get the length of the two equal sides.
Why the base and the height are enough
An isosceles triangle has two equal sides and a base, and its symmetry does most of the work. The altitude dropped from the apex always lands on the exact midpoint of the base, splitting the figure into two identical right triangles. In each half, one leg is the height, the other is half the base, and the hypotenuse is the equal side you are after. Pythagoras then gives it in one step: square the height, add the square of half the base and take the square root. With a base of 6 and a height of 4, half the base is 3, so the side is the square root of 16 plus 9, which is 5. Unlike many triangle problems, every positive pair works, because raising the apex any amount above the midpoint always gives two equal sides that meet.
Where it helps, and the usual slip
Builders use it for the rafters of a symmetric gable from the span and the rise, teachers for one-line Pythagoras exercises, and people who sew for the equal edges of triangular panels, pennants or sail gussets. The most common slip is using the whole base instead of half of it, which makes the sides far too long. Zero or negative measurements are refused rather than turned into a number. Results are rounded to six decimals by default, and you can choose anything from 0 to 10.
Why base and height are enough
An isosceles triangle is fully determined by two independent measurements, and base plus height is one of the most natural pairs: the base tells you how wide the figure is, and the height tells you how tall it rises. The reason the equal sides follow immediately is symmetry. The altitude dropped from the apex to the base always lands on the exact midpoint of the base, dividing the triangle into two congruent right triangles.
Each half is a right triangle whose vertical leg is the height, whose horizontal leg is half the base, and whose hypotenuse is precisely the equal side you are looking for. The Pythagorean theorem then gives the answer in one step: side = √(height² + (base/2)²). There is no iteration, no approximation, and no case analysis — any pair of positive numbers describes a valid isosceles triangle, because raising the apex by any positive amount above the midpoint always produces two equal sides that meet.
What you can do with it
Roofing and framing
Get the rafter length of a symmetric gable roof from the building span (base) and the rise at the ridge (height) before cutting lumber or ordering materials.
Geometry homework
Turn the symmetry of an isosceles triangle into a one-line Pythagorean calculation, with adjustable decimals for step-by-step classroom checking.
Sewing and fabrication
Size the two equal edges of triangular panels, pennants, or sail gussets from the finished width and depth you actually designed to.
FAQ
What inputs does it need?
Two numbers: base (the unequal bottom edge) and height (the altitude from the base to the apex). Both must be positive and finite.
Which formula is used?
The altitude bisects the base, so each equal side is the hypotenuse of a right triangle with legs height and base/2: side = √(height² + (base/2)²).
Can base and height be any positive numbers?
Yes. Any pair of strictly positive finite numbers describes a valid isosceles triangle — unlike solving from sides, there is no triangle inequality to fail here.
What exactly is returned?
An object echoing the base and height plus the computed equal side length, all rounded half-up to the decimals you chose (six by default).
How do I find the rafter length for a gable roof?
Enter the span of the building as the base and the rise at the ridge as the height; the equal side is the rafter. A span of 6 with a rise of 4 gives rafters of 5, in the same unit you measured in.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/math/isosceles-triangle-side \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"base":6,"height":4}'const res = await fetch("https://api.kit.forhosting.com/math/isosceles-triangle-side", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"base": 6,
"height": 4
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/isosceles-triangle-side",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"base": 6,
"height": 4
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/isosceles-triangle-side", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"base":6,"height":4}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"base":6,"height":4}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/isosceles-triangle-side", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"base": 6,
"height": 4
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.isosceles_triangle_side",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
The altitude from the apex always bisects the base, splitting the figure into two congruent right triangles, so each equal side is the hypotenuse of a right triangle with legs height and half the base: side = √(height² + (base/2)²). Both inputs must be positive finite numbers; anything else — zero, negatives, strings, null, NaN, or Infinity — is rejected with a typed invalid_input error that names the offending field. The response echoes the base and height alongside the computed side, all rounded half-up to the number of decimals you choose, six by default.
Why base and height are enough
For example, base = 6 and height = 4 yields half-base = 3 and side = √(16 + 9) = √25 = 5, the familiar 3-4-5 right triangle mirrored to form a full isosceles triangle.
Validation that names the guilty field
The optional decimals field must be an integer between 0 and 10; anything else, including fractional values or out-of-range integers, is rejected as well. Every input is checked before any arithmetic happens, and every rejection is a typed invalid_input error whose message names the field that failed and the rule it broke. The base and the height must each be a JSON number — strings, booleans, null, arrays, and objects are refused — and that number must be finite and strictly positive. A zero or negative base does not describe a triangle at all, and a zero height collapses the figure into a flat segment whose 'equal sides' would just be two halves of the base lying on the same line, a degenerate case this endpoint rejects rather than answers.
Rounding, precision, and determinism
The optional decimals field controls the final rounding: it defaults to 6, accepts any integer from 0 to 10, and applies a deterministic half-up rule — multiply by ten to the power of decimals, add one half, floor, and divide back. Rounding to zero decimals is allowed and returns whole numbers, useful for coarse material or carpentry estimates. The side length is first computed in full IEEE-754 double precision — square the height, square the half base, add, and take the square root — and only then rounded, so the rounding step never feeds back into the computation and cannot compound across outputs. The response contains three fields — base, height, and side — all rounded with the same rule, so the triple you receive is always internally consistent. If inputs are so large that intermediate squares overflow to Infinity, the call is rejected as a typed error instead of returning a non-finite side, because Infinity is never a useful answer to hand back to a client.
Technical questions
Is it free?
The tier A browser widget is free and runs the same isomorphic module as the API, which is billed from $0.002 per call.