Right triangle from hypotenuse and angle calculator
This right triangle calculator starts with the hypotenuse and one acute angle, then determines every remaining measurement needed for a complete solution.
Run — free
It calculates the leg opposite the supplied angle, the adjacent leg, the other acute angle, and the triangle's area. The input angle is checked before calculation, so zero, right, obtuse, or nonnumeric angles are rejected instead of producing a misleading shape. Results use the same length unit as the hypotenuse, while area uses that unit squared.
Enter the hypotenuse and identify the angle
Start with the hypotenuse, which is the side directly opposite the 90-degree corner and always the longest side of a valid right triangle. Enter its positive length without adding a unit symbol. You may use any consistent length unit, such as millimeters, centimeters, meters, inches, or feet, because the formulas depend on proportions. Next, enter the known acute angle in degrees. The angle must be strictly greater than 0 and strictly less than 90. Think carefully about where that angle sits: the opposite leg is the side across from it, while the adjacent leg touches it but is not the hypotenuse. This naming matters because exchanging opposite and adjacent changes which result belongs to which side, even though the two numerical leg values still describe the same triangle after rotation. The calculator validates both inputs before applying any trigonometry, preventing degenerate triangles and results based on infinite, missing, or nonnumeric values.
Understand how each result is calculated
The calculation converts the supplied angle from degrees to radians for the underlying trigonometric functions. It multiplies the hypotenuse by the sine of the angle to find the opposite leg, and multiplies the hypotenuse by the cosine of the angle to find the adjacent leg. The remaining acute angle follows from the angle sum of a triangle: because one angle is exactly 90 degrees, the two acute angles must add to 90 degrees. The area is then one half of the product of the two perpendicular legs. These relationships form a complete deterministic solution, so no iterative approximation or external data is needed. Displayed results are rounded only after the calculations, which preserves useful precision and avoids compounding intermediate rounding errors. The returned hypotenuse and both legs share the input length unit. The area is expressed in the corresponding square unit, and every angle in the response is expressed in degrees.
Check the solution and use sensible precision
A quick verification helps catch data-entry mistakes. Square both returned legs and add them; the total should closely match the square of the hypotenuse, allowing for the displayed rounding. You can also add the supplied acute angle, the calculated other acute angle, and 90 degrees; their sum should be 180 degrees. When using the area in a downstream estimate, remember that precision cannot exceed the precision of the original measurements. A hypotenuse measured to the nearest centimeter does not justify treating a long decimal result as exact. Keep extra digits during intermediate work, then round the final value to the tolerance required by your drawing, classroom problem, fabrication plan, or survey. Very small acute angles create one very short leg, while angles close to 90 degrees create one leg nearly as long as the hypotenuse. Those cases are mathematically valid as long as the angle remains strictly inside the accepted acute range.
What you can do with it
Lay out a ramp
Convert a measured sloped length and incline angle into horizontal run, vertical rise, and triangular area.
Solve a trigonometry exercise
Check both legs and the complementary acute angle from the two values supplied in a right-triangle problem.
Plan a diagonal brace
Use a brace length and installation angle to calculate its horizontal and vertical spans before cutting.
FAQ
What values do I need?
Provide the positive hypotenuse length and one acute angle measured in degrees.
Why must the angle be between 0 and 90 degrees?
A right triangle already contains a 90-degree angle, so each of its other two angles must be strictly acute.
Which units can I use?
Use any consistent length unit. Both legs use that unit, and the area uses the corresponding square unit.
How are the legs identified?
The opposite leg lies across from the supplied angle. The adjacent leg touches that angle and is not the hypotenuse.
What does the API request cost?
The API price is $0.002 per request. The browser calculation is available without an API request.
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/trig/right-triangle-hypotenuse-angle \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"hypotenuse":10,"angle":30}'const res = await fetch("https://api.kit.forhosting.com/trig/right-triangle-hypotenuse-angle", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"hypotenuse": 10,
"angle": 30
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/right-triangle-hypotenuse-angle",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"hypotenuse": 10,
"angle": 30
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/right-triangle-hypotenuse-angle", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"hypotenuse":10,"angle":30}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"hypotenuse":10,"angle":30}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/right-triangle-hypotenuse-angle", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"hypotenuse": 10,
"angle": 30
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.right_triangle_hypotenuse_angle",
"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. |