ForHosting KIT · Math

Triangle angle from side and altitude calculator

A side of 10 with an altitude of 5 gives a 30° angle. Enter the side next to the angle and the perpendicular height, and get that base angle in degrees and radians without knowing the rest of the triangle. 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
Side
10
Altitude
5
You get
Ratio
0.5
Angle rad
0.5235987756
Angle deg
30
Unit angles
deg

When a perpendicular is dropped inside a triangle, the altitude and one of the sides that meet at a base vertex form a right triangle. In that right triangle the altitude is the side opposite the base angle and the original triangle side is the hypotenuse, so the sine of the angle equals altitude over side. Students, surveyors, roof designers, and CAD scripts often know those two lengths and need the angle without rebuilding the whole figure. This calculator applies the inverse sine of altitude over the adjacent side, returns the angle in degrees and radians, and rejects inputs that leave the arcsine domain.

Why sin(theta) equals altitude over the adjacent side

Drop a perpendicular from a vertex of a triangle to the line that contains the opposite side. That altitude of length h creates one or two right triangles that share the height. Focus on the right triangle whose hypotenuse is one of the original sides of the large triangle: call that side length s.

At the base vertex where that side meets the base line, the angle theta has opposite side equal to the altitude and hypotenuse equal to s. By the definition of sine in a right triangle, sin of theta equals opposite over hypotenuse, which is exactly altitude over side. Solving for the angle gives theta equals the inverse sine of altitude over side.

The result is always an acute or right angle in the geometric setting we care about: when altitude is strictly less than side the angle is acute; when altitude equals side the angle is ninety degrees and the foot of the altitude sits at the other end of that hypotenuse segment. If altitude were greater than side, the ratio would exceed one and no real angle would exist, so the calculator rejects that case with invalid input rather than inventing a complex value.

This identity is local to the altitude right triangle; you do not need the third side or any other angle of the large triangle to recover this particular base angle from those two lengths alone.

Where this angle calculation helps

Architecture and civil drafting often measure a clear span side and a known rise or setback altitude; converting that pair into the base pitch angle is a one-line inverse sine step that should not require a full CAD kernel. Roofing and tent layouts, triangular lot setbacks, and truss design notebooks all need the same angle so clearance checks and material take-offs stay honest. Classroom and tutoring platforms use a triangle angle from side and altitude calculator so learners can verify homework without hunting which side is opposite the altitude foot.

Exam generators and LMS plugins need a deterministic oracle that rejects impossible ratios greater than one instead of returning NaN. Failed validation does not consume balance. Keep requests small, pin the rounded angle in tests, and you get reproducible angles for homework, LMS plugins, and edge workers without standing up a geometry library of your own.

Roof pitch from rise and rafter length

Convert a measured rafter (adjacent side) and vertical rise (altitude) into the pitch angle for framing, permits, and material estimates.

Classroom altitude-right-triangle checks

Let students submit side and altitude and verify that the base angle matches the textbook arcsine of height over hypotenuse.

Survey and setback scripts

Recover a base angle from a known side length and perpendicular offset without loading a full GIS or CAD stack.

How do I find a triangle angle from a side and its altitude?

Send positive side (adjacent hypotenuse of the altitude right triangle) and positive altitude with altitude ≤ side.

What angle do a side of 10 and an altitude of 5 give?

They give a 30° angle. The altitude divided by the side is 0.5, and the angle whose sine is 0.5 is 30°, or about 0.523598775598 radians.

Why is an altitude longer than the side rejected?

Because no real angle would exist. The altitude is the side opposite the angle in a right triangle whose longest side is your triangle side, so it can never be longer than that side.

What happens if the altitude equals the side?

The angle is exactly a right angle. The altitude then runs along the side itself, so the foot of the perpendicular sits at the far end of that side.

Do I need the third side or the other angles?

No. The side and the altitude alone fix this base angle, because together they form a small right triangle of their own. Nothing else about the larger triangle is needed for this one angle.

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/trig/triangle-angle-from-side-altitude

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/trig/triangle-angle-from-side-altitude \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"side":10,"altitude":5}'
{
  "side": 10,
  "altitude": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "trig.triangle_angle_from_side_altitude",
  "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.

Input contract, response fields, and validation errors

Side must be strictly greater than zero. Altitude must be strictly greater than zero and must not exceed side, because the sine ratio altitude over side must lie in the closed interval from just above zero through one. Those failures are not billed. Example: side ten with altitude five yields ratio one half, angle thirty degrees, and the corresponding radian value of pi over six. POST a JSON body with two required finite numbers: side, the positive length of the triangle side that acts as the hypotenuse of the altitude right triangle, and altitude, the positive perpendicular height used as the opposite side for the angle of interest. Each field may arrive as a JSON number or as a numeric string; aliases such as s, adjacent, hypotenuse for side and h, height, alt for altitude are accepted. Missing fields, empty strings, and non-finite values fail with invalid_input naming the field. On success the body echoes side and altitude, reports ratio as altitude divided by side, returns angle_rad as the principal arcsine in radians, returns angle_deg as the same angle converted with one hundred eighty over pi, and sets formula to the identity theta equals arcsin of altitude over side. The field unit_angles is always deg to mark that angle_deg is the primary human-facing unit. Pair the numbers with your own diagram if you need a sketch; this endpoint returns the angle and related scalars only.

What if altitude is greater than the side?

The task fails with invalid_input. sin(θ) = altitude/side cannot exceed 1 for a real angle, so altitude must not exceed side.

Is the answer in degrees or radians?

Both. angle_deg is the primary degree value; angle_rad is the principal arcsine in radians. unit_angles is always deg.

Which side do I pass as 'side'?

The side adjacent to the angle that becomes the hypotenuse of the right triangle formed by the altitude (not the base segment that the foot lands on, unless that happens to be the hypotenuse).

What does the triangle angle from side and altitude calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →