Adjacent Side Calculator from Angle and Opposite Side
This adjacent side calculator finds the missing leg of a right triangle when you know an acute angle and the length of the side opposite that angle.
Run — free
It applies the tangent relationship directly: the adjacent side equals the opposite side divided by the tangent of the angle. Enter the angle in degrees and a positive opposite-side length to receive a deterministic numeric result. Validation rejects non-finite values, invalid right-triangle angles, nonpositive lengths, and any case that could make division unsafe.
Identify the angle and the opposite side correctly
Begin by locating the right angle, then focus on the acute angle supplied to the calculator. The adjacent side is the leg that touches that acute angle but is not the hypotenuse. The opposite side is the leg directly across from the same angle. This distinction matters because the words adjacent and opposite change when you switch from one acute angle to the other. Enter the selected acute angle in degrees and the known opposite-side length using any consistent unit, such as millimetres, centimetres, metres, inches, or feet. The result uses that same length unit because trigonometric ratios do not introduce a new unit. Do not enter the hypotenuse as the opposite side. Also avoid using the right angle itself: a right triangle has two acute angles, and this calculation requires one strictly between zero and ninety degrees. A quick sketch with the known angle marked often prevents the most common input reversal and makes the returned length much easier to verify.
Understand the tangent calculation and safety checks
For an acute angle in a right triangle, tangent is defined as the opposite side divided by the adjacent side. Rearranging that relationship gives adjacent side equals opposite side divided by tangent of the angle. The calculator converts the degree value to radians for the JavaScript trigonometric function, evaluates the tangent, and performs the division. It accepts only finite numeric inputs, requires a positive opposite-side length, and requires an angle greater than zero and less than ninety degrees. Those boundaries are important rather than cosmetic. At zero degrees the tangent is zero, so dividing by it is not valid. At ninety degrees the tangent is not a finite geometric ratio for this purpose. The implementation also checks the computed tangent before division and confirms that the final adjacent length is finite. These protections ensure malformed, infinite, or geometrically impossible values produce a typed input error instead of a misleading result such as infinity, a negative length, or a value that cannot be represented reliably.
Interpret and verify the calculated length
The returned object includes the supplied angle, the supplied opposite-side length, and the calculated adjacent-side length. Keep the result in the same unit used for the known side. If the opposite side was entered in metres, the adjacent side is also in metres; if it was entered in inches, the result is in inches. You can perform a useful reasonableness check by comparing the angle with forty-five degrees. At forty-five degrees the two legs are equal. Below forty-five degrees, the adjacent leg should be longer than the opposite leg, while above forty-five degrees it should be shorter. Small differences in displayed decimals can occur because tangent values are often irrational and floating-point arithmetic has finite precision. For construction or manufacturing, retain enough digits during intermediate work and round only at the precision supported by your measurements. This calculator solves a right triangle only. It should not be used for an oblique triangle, and it does not infer whether measurements taken from a real object actually form an exact right angle.
What you can do with it
Plan a ramp run
Find the horizontal run from a measured rise and incline angle when the ramp forms a right triangle.
Check a surveying offset
Convert a perpendicular offset and observed acute angle into the corresponding adjacent ground distance.
Complete a geometry exercise
Solve for the missing adjacent leg and retain the supplied values alongside the result for easy checking.
FAQ
What formula does the calculator use?
It uses adjacent side = opposite side / tan(angle), with the angle supplied in degrees.
What does it cost?
It is free to run in the browser on this page, and an API request costs $0.002.
Which unit should I use for the side length?
Use any single length unit consistently. The adjacent-side result has the same unit as the opposite side.
Why must the angle be between zero and ninety degrees?
The selected angle in a right triangle must be acute. Zero would make tangent zero, and ninety does not provide a finite tangent ratio for this calculation.
Why is my result longer than the opposite side?
For angles below forty-five degrees, tangent is less than one, so dividing the opposite side by tangent produces a longer adjacent side.
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/adjacent-side-from-angle \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"angle_degrees":45,"opposite_side":10}'const res = await fetch("https://api.kit.forhosting.com/trig/adjacent-side-from-angle", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"angle_degrees": 45,
"opposite_side": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/adjacent-side-from-angle",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"angle_degrees": 45,
"opposite_side": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/adjacent-side-from-angle", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"angle_degrees":45,"opposite_side":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"angle_degrees":45,"opposite_side":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/adjacent-side-from-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
{
"angle_degrees": 45,
"opposite_side": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.adjacent_side_from_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. |