ForHosting KIT · Math

Angle of a right triangle from two sides, in degrees

With an opposite side of 3 and an adjacent side of 4, the angle is 36.8698976458 degrees. Name the two sides you know by their role and the right inverse function is chosen for you, for roof pitches, ramps or homework. 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
Opposite
3
Adjacent
4
You get
Angle deg
36.8698976458
Angle unit
deg

In a right triangle, each acute angle is locked in by the ratio of two sides: opposite over hypotenuse gives the sine, adjacent over hypotenuse gives the cosine, and opposite over adjacent gives the tangent. Reversing those ratios with inverse trigonometric functions recovers the angle itself. That is the everyday calculation behind roof pitches, ramp inclinations, ladder safety angles, and homework problems that hand you two lengths and ask how steep the corner is. This capacity accepts exactly two side lengths named by their role relative to the angle you want — opposite, adjacent, or hypotenuse — so you never have to decide which leg is which.

How two sides of a right triangle determine an acute angle

A right triangle has one ninety-degree angle, so its two acute angles always sum to ninety degrees. Once you know any two side lengths, the shape of the triangle is fixed and each acute angle follows from a single ratio. If the two known sides are the leg opposite your angle and the leg adjacent to it, their quotient is the tangent of the angle, and the two-argument arctangent turns that ratio back into degrees.

If you know the opposite leg and the hypotenuse, the quotient is the sine and the inverse sine gives the angle. If you know the adjacent leg and the hypotenuse, the quotient is the cosine and the inverse cosine does the job. Search intent clusters around phrases like angle of a right triangle from two sides, find angle given opposite and adjacent, inverse tangent calculator, and roof pitch angle from rise and run.

People want a numeric answer they can check against a worksheet key, a building code table, or a CAD note — not a lecture on trigonometry. Naming the inputs by their geometric role (opposite, adjacent, hypotenuse) instead of generic leg labels removes the most common mistake in this calculation: swapping which side is which and silently getting the complementary angle. The response spells out which inverse function was used, so the result stays auditable when you paste it into notes, a report, or an automated test.

Input validation, the three formulas, and how the result is computed

The engine counts the provided fields: fewer than two leaves the angle under-determined, all three over-specifies the problem and can hide inconsistent data, so only pairs proceed. When both legs are given, the angle is the two-argument arctangent of opposite over adjacent, converted from radians to degrees. When the opposite leg and hypotenuse are given, the engine first verifies the hypotenuse is strictly longer than the leg — otherwise no real right triangle exists — and then applies the inverse sine of their ratio.

The adjacent-plus-hypotenuse case applies the inverse cosine after the same longest-side check. Edge cases are explicit and rejected early: a hypotenuse equal to a leg would force a degenerate zero-degree angle, a shorter hypotenuse is geometrically impossible, and missing or extra sides are counted and reported in the error message. The response includes the angle in degrees, the angle unit, the formula applied, and the method tag, so downstream code can assert on the whole contract rather than scraping a bare number.

Practical use, limits, pricing, and delivery channels

Use the browser tool when you need one quick angle — checking a ramp against an accessibility guideline, converting a roof's rise and run into a pitch angle, verifying a ladder leans within the recommended seventy-five-degree zone, or confirming a trigonometry exercise without installing a computer-algebra system. Side lengths can be in any unit you like — millimetres, inches, metres — because the angle depends only on the ratio, and the response carries that unit independence by reporting degrees alone.

Accepted inputs must describe a genuine right triangle: exactly two positive sides, with the hypotenuse strictly the longest side when present. Results are fully deterministic: the same two lengths always yield the same angle and the same formula field. There is no language model, no external geometry service, and no randomness in the computation path, so the capacity is safe to pin in reproducible lesson materials, contest answer checkers, and regression suites.

Roof pitch and ramp angle checks

Convert rise and run measurements into an inclination angle in degrees to compare against building codes, accessibility guidelines, or a roof manufacturer's pitch table.

Trigonometry homework and answer keys

Students and graders confirm the acute angle from any two sides — opposite/adjacent, opposite/hypotenuse, or adjacent/hypotenuse — with the exact inverse function named in the response.

Which formula is used for each pair of sides?

Opposite and adjacent → atan2(opposite, adjacent); opposite and hypotenuse → asin(opposite / hypotenuse); adjacent and hypotenuse → acos(adjacent / hypotenuse). All results are converted from radians to degrees.

What happens if a side is zero or negative?

Every side length must be a positive finite number; those failed calls are not charged.

Why was my hypotenuse rejected?

The hypotenuse must be strictly longer than each leg.

Is the angle calculator free?

The browser tool runs free on your device.

How do I find the other acute angle?

Subtract the result from 90 degrees. A right triangle has one 90-degree angle, so its two acute angles always add up to 90, and once you know one, the other follows directly.

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/angle-of-right-triangle

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/angle-of-right-triangle \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"opposite":3,"adjacent":4}'
{
  "opposite": 3,
  "adjacent": 4
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.angle_of_right_triangle",
  "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.

It validates that every length is a positive finite number, checks that the hypotenuse is strictly the longest side when it appears, and returns the angle in degrees as structured JSON.

Input validation, the three formulas, and how the result is computed

Send a JSON body with exactly two of the three fields: opposite, adjacent, and hypotenuse. Each provided length must be a positive finite number; numeric strings are accepted, but zero, negative values, infinities, and non-numeric text fail with invalid_input before any trigonometry runs.

Practical use, limits, pricing, and delivery channels

Each successful request is one billable item at $0.002; failed validation does not consume balance.

Deterministic fixtures for geometry tests

Pipelines that seed unit tests or interactive demos can call a pure inverse-trig oracle instead of reimplementing asin, acos, and degree conversion in every language.

How do I find an angle of a right triangle with this API?

Send a JSON body to math.angle_of_right_triangle with exactly two of opposite, adjacent, and hypotenuse — the sides named by their role relative to the angle. The response returns angle_deg in degrees plus the formula used.

Read the full KIT documentation →