45-45-90 triangle calculator
Give one leg or the hypotenuse and get every other measure: a leg of 5 means a hypotenuse of 5 times √2 and an area of 12.5. Handy for the diagonal of a square panel or a right-angled brace. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Leg
- 5
- Given
- leg
- Legs
- 5, 5
- Hypotenuse
- 7.0710678119
- Area
- 12.5
The 45-45-90 triangle calculator fills in every missing side and the area of an isosceles right triangle from a single positive length. You supply either one equal leg or the hypotenuse opposite the right angle; the engine applies the fixed ratio one to one to root two, so the other leg matches the given leg, the hypotenuse is the leg times the square root of two, and the area is half the square of a leg. When you start from the hypotenuse instead, each leg is the hypotenuse divided by the square root of two. Results are deterministic floating-point arithmetic with no random sampling and no network call.
What a 45-45-90 triangle is and what you get
A 45-45-90 triangle is an isosceles right triangle: two acute angles of forty-five degrees and one right angle of ninety degrees. Because the two acute angles are equal, the two legs that form the right angle are equal as well. The hypotenuse—the side opposite the right angle—is always longer than either leg by the constant factor square root of two.
That fixed ratio is the entire reason this calculator exists as its own tool: once you know any one positive side length, every other measure is determined, including the area which is simply one-half times leg times leg.
The response reports which field you supplied (leg or hypotenuse), the common leg length, an array of both equal legs for callers that expect two side values, the hypotenuse, the area, the three fixed angles in degrees, the classic ratio string one to one to root two, and a short formula line restating the relations. The contract is intentionally strict.
If you need the ambiguous SSA case, a circumcenter, or a general right triangle without the isosceles constraint, use those dedicated tools; the search intent here is specifically the 45-45-90 special right triangle and a clear answer of complete sides plus area or an honest error.
Where 45-45-90 solving fits in study, design, and code
Students meet 45-45-90 triangles early when special right triangles are introduced alongside 30-60-90 figures. A textbook may give only the leg of a square cut along the diagonal, or only the diagonal of a square, and ask for every remaining length and the triangular area; this calculator returns those numbers in one shot with the ratio made explicit. Teachers can pre-generate answer keys that list both legs, the hypotenuse, and the area, and refuse impossible non-positive inputs instead of printing a blank.
Carpenters, fabricators, and game-level designers often need the diagonal of a square panel or the equal sides of a right isosceles brace; converting between leg and diagonal without a hand calculator or a misremembered formula avoids layout mistakes. Developers call the same contract from scripts to seed deterministic test vectors for geometry libraries, to illustrate special-triangle identities in teaching tools, or to satisfy programming-challenge statements that demand exact 45-45-90 completions.
What you can do with it
Homework and exam preparation
Complete textbook 45-45-90 problems from a single given leg or hypotenuse, and check both remaining sides plus the triangular area against answer keys.
Square diagonals and braces
Convert between the side of a square and its diagonal (the hypotenuse of two 45-45-90 halves) for carpentry, sheet layouts, and game geometry.
FAQ
What does the 45-45-90 triangle calculator cost?
It is free in your browser on this page.
What is the side ratio of a 45-45-90 triangle?
The hypotenuse is always leg times the square root of two; each leg is the hypotenuse divided by the square root of two.
How is the area computed?
Area equals leg squared over two (½ · leg · leg), because the two legs are the base and height of the right triangle and they are equal.
What happens if the given length is zero or negative?
Side lengths must be strictly positive finite numbers; zero and negative values cannot form a real triangle.
Do I need to enter both legs?
No. Provide one leg or the hypotenuse. The two legs of a 45-45-90 triangle are always equal, so a single leg value sets both.
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/geom/triangle-45-45-90 \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"leg":5}'const res = await fetch("https://api.kit.forhosting.com/geom/triangle-45-45-90", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"leg": 5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/triangle-45-45-90",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"leg": 5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/triangle-45-45-90", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"leg":5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"leg":5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/triangle-45-45-90", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"leg": 5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.triangle_45_45_90",
"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
Non-positive or missing lengths are rejected with invalid_input rather than silent zeros, so homework checks and automated pipelines fail loudly.
What a 45-45-90 triangle is and what the response contains
Missing both leg and hypotenuse, zero, negative values, Infinity, and NaN all raise invalid_input with a message that names the failing condition.
How leg and hypotenuse are read and how the sides are computed
You must provide at least one of the two; when both appear, the leg is treated as the source of truth so a single explicit short side always wins. Computation is elementary: if a positive leg L is given, both legs equal L, the hypotenuse is L times Math.SQRT2, and the area is L squared over two. If only a positive hypotenuse H is given, each leg is H divided by Math.SQRT2 and the area uses that recovered leg. There is no angle input because the angles never change, and there is no third free side because the isosceles constraint would be violated if the two legs differed. The preferred fields are leg and hypotenuse as JSON numbers, but decimal strings are accepted for form and spreadsheet callers. Aliases a, leg_a, side, and short_side map to leg; aliases c, hyp, and long_side map to hypotenuse. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the root-two identities yourself.
Where 45-45-90 solving fits in study, design, and code
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split—free interactive exploration and a priced, identical API—matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with unit converters when sides arrive in mixed units, with other free math endpoints when you need series or combinatorial companions for a lab of deterministic tools, and with diagramming notes that show students the square-and-diagonal picture so the numbers and the figure stay aligned.
Integration use cases
Deterministic geometry fixtures
Generate reproducible leg, hypotenuse, and area triples for unit tests, contest validators, and CI assertions without hand-rolled root-two arithmetic.