Angle of elevation calculator
A target 50 units higher at a horizontal distance of 100 sits at an angle of elevation of 26.565051177078°. Enter the ground distance and the height difference to get the sight-line angle, labeled elevation, depression or level. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Horizontal
- 100
- Height
- 50
- Angle deg
- 26.5650511771
- Signed angle deg
- 26.5650511771
- Angle rad
- 0.463647609
- Signed angle rad
- 0.463647609
When you stand on level ground and look up at a tower, tree, or aircraft, the angle between your horizontal line of sight and the line to the object is the angle of elevation. Looking down from a cliff or balcony yields the angle of depression instead. This calculator takes a positive horizontal distance and a signed height difference, applies the single inverse-tangent formula that defines those angles in a right triangle, and returns both the magnitude in degrees and radians and a kind label of elevation, depression, or level.
How elevation and depression come from a right triangle
Imagine a right triangle whose base is the horizontal ground distance from the observer to the point directly below or above the target, and whose opposite leg is the vertical height difference between the observer’s eye level and the target. The angle at the observer between the base and the hypotenuse is exactly the elevation or depression angle. In symbols, the tangent of that angle equals opposite over adjacent, so the angle itself is the arctangent of height divided by horizontal distance.
When height is positive the observer looks upward and the result is an elevation angle; when height is negative the observer looks downward and the magnitude is a depression angle; when height is zero the line of sight is horizontal and the angle is zero. Conversion from radians to degrees multiplies by one hundred eighty over pi. Because every quantity after the ratio is a single inverse tangent, the path is fully deterministic: the same finite run and rise always produce the same angles within floating-point rounding.
Classic classroom checks include a one-to-one ratio that yields forty-five degrees, a fifty-over-one-hundred ratio near twenty-six point five seven degrees, and a zero height that returns level with both signed and absolute angles equal to zero.
Where elevation and depression angles show up in real work
Secondary-school trigonometry and pre-calculus courses constantly ask students to find the angle of elevation to a building or the angle of depression from a lighthouse when only ground distance and height are known; a trusted calculator with a hard zero-distance check speeds homework grading and removes spreadsheet mistakes where someone divides by a blank cell. Field science and outdoor education often estimate tree height or cliff depth with a clinometer, then reverse the problem to recover the clinometer reading from measured base and height for worksheet keys.
Surveying, architecture, and construction workflows need quick sight-line angles before staking or placing temporary barriers, and a shared numeric oracle keeps field notes and office scripts aligned. Game and simulation tutorials use the same atan rise-over-run path for camera pitch toward a target or for UI overlays that show look-up and look-down angles. If you later need full right-triangle solvers from one side and one acute angle, inverse cosine of a ratio alone, or Earth-curvature corrected sight lines, treat those as separate search intents rather than overloading this elevation-calculator landing.
What you can do with it
Field science worksheets
Recover the clinometer-style angle from measured base and height when building answer keys for outdoor labs.
FAQ
What does this calculator compute?
Given a positive horizontal distance and a height difference, it returns the angle of elevation (height > 0) or depression (height < 0) via arctangent of height over distance, in degrees and radians.
Can height be negative?
Yes. Negative height means the target is below the observer, so kind is depression and signed angles are negative. Zero height returns kind level with angle zero.
What does it cost?
The browser tool is free and runs locally.
What is the angle of elevation for a height of 50 at a distance of 100?
It is 26.565051177078 degrees. The calculator divides the height by the horizontal distance and takes the arctangent, so any unit works as long as both values use the same one.
Why is a horizontal distance of zero refused?
At zero distance you stand directly under or over the target, so the angle is undefined and would need a division by zero. A negative distance is refused too, because distance always means a length.
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/trig/angle-of-elevation \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"horizontal_distance":100,"height":50}'const res = await fetch("https://api.kit.forhosting.com/trig/angle-of-elevation", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"horizontal_distance": 100,
"height": 50
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/angle-of-elevation",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"horizontal_distance": 100,
"height": 50
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/angle-of-elevation", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"horizontal_distance":100,"height":50}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"horizontal_distance":100,"height":50}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/angle-of-elevation", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"horizontal_distance": 100,
"height": 50
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.angle_of_elevation",
"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
Zero horizontal distance is rejected with a clear invalid_input error, because the angle is undefined when the observer sits directly under or over the target foot. The free browser tool and the paid API share one pure function, so classroom demos and automated pipelines never silently diverge on the same inputs.
What you send and what you get back
Zero is explicitly illegal because division by zero makes the angle undefined; negative distance is also rejected so distance always means a length rather than a signed offset. Wire the free browser tool for quick sanity checks, then call the identical contract from scripts when you need bulk elevation recovery without reimplementing the zero-run gate in every language. Provide two required finite numbers: horizontal_distance (aliases distance, horizontal, run, adjacent, d) as a strictly positive ground length in any consistent linear unit, and height (aliases rise, vertical, height_diff, delta_h, h) as the signed vertical offset of the target relative to the observer. Missing fields, non-numeric strings, NaN, and Infinity are rejected with invalid_input and are not charged. After parsing, the service checks that horizontal_distance is greater than zero. On success the JSON response echoes the normalized distance and height, returns angle_deg and angle_rad as non-negative magnitudes suitable for textbook answers, returns signed_angle_deg and signed_angle_rad with the same magnitude but a sign matching the height, sets kind to elevation, depression, or level, sets unit_angles to deg, and includes method as the string atan_height_over_run for documentation in logs and teaching UIs. Example checks: distance one hundred and height fifty yield roughly twenty-six point five seven degrees of elevation; distance ten and height negative ten yield forty-five degrees of depression with a negative signed angle; distance zero fails with an error message that names horizontal_distance.
Where elevation and depression angles show up in real work
Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.
Integration use cases
Homework and exam checks
Compute elevation or depression from ground distance and height, and reject zero horizontal distance with a clear invalid_input error.
Sight-line and game helpers
Get camera or observer pitch toward a target from run and rise using the same atan path in browser and API.
Technical questions
What formula does it use?
θ = arctan(height / horizontal_distance). Absolute angle_deg is the magnitude; signed_angle_deg is positive for elevation and negative for depression.
What happens if the horizontal distance is zero?
The request fails with invalid_input. The angle is undefined when the horizontal distance is zero; the error message names the horizontal_distance field.