Horizontal distance from elevation angle
An object 50 units tall seen at a 30° elevation stands 86.602540378444 units away horizontally, because the tangent of 30° is 0.57735026919. Use any length unit you like; the distance comes back in the same one. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Height
- 50
- Angle deg
- 30
- Angle rad
- 0.5235987756
- Tan angle
- 0.5773502692
- Horizontal distance
- 86.6025403784
When you know how tall a tower, tree, building, or cliff face is and you can measure the angle of elevation from your eye level up to the top of that object, the missing ground distance follows from a single right-triangle identity. The tangent of the elevation angle equals opposite over adjacent, so the horizontal distance equals the known height divided by the tangent of the angle. This calculator takes a positive height in any consistent linear unit and an elevation angle in degrees strictly between zero and ninety, converts the angle to radians, applies that closed formula, and returns the horizontal distance together with the intermediate tangent and the angle in radians.
How height and elevation angle fix the ground distance
Picture a right triangle whose vertical leg is the known height of the object above your eye level and whose angle at the observer is the elevation angle you measured with a clinometer, theodolite, or homework protractor. The base of that triangle is the horizontal distance from your standing point to the point directly below the top of the object. By definition, the tangent of the elevation angle equals the opposite side over the adjacent side, which means tan(θ) equals height divided by horizontal distance.
Rearranging gives the working formula: horizontal distance equals height divided by tan(θ). The angle must be converted from degrees to radians before most programming runtimes evaluate the tangent function, multiplying by pi over one hundred eighty. Classic textbook checks include a thirty-degree elevation with height fifty, which yields a horizontal distance of fifty times the square root of three, and a forty-five-degree elevation where the distance equals the height exactly because tan(45°) is one.
Because every quantity after the validation steps is a single division by a tangent, the path is fully deterministic: the same finite height and angle always produce the same distance within floating-point rounding.
Where distance-from-elevation shows up in real work
Secondary-school trigonometry and pre-calculus courses constantly ask students to find how far from a building you must stand when the building height and the angle of elevation to the top are given; a trusted calculator with hard open-interval checks speeds homework grading and removes spreadsheet mistakes where someone divides by tan of a blank cell or of ninety degrees. Field science and outdoor education often measure tree or cliff height independently, then need the ground distance that corresponds to a planned clinometer reading for worksheet keys and safety buffers.
Surveying, architecture, and construction workflows need quick standoff ranges before staking temporary barriers or placing instruments so that a planned elevation angle is achieved. Game and simulation tutorials use the same height-over-tangent path for camera distance from a known object height and look-up pitch, or for UI overlays that place markers at correct ground range.
If you later need the inverse problem of recovering elevation angle from run and rise, a full right-triangle solver from one side and one acute angle, or Earth-curvature corrected sight lines, treat those as separate search intents rather than overloading this horizontal-distance landing.
What you can do with it
Field and clinometer worksheets
Recover the ground distance that matches a planned elevation reading when object height is already measured for outdoor labs.
FAQ
What does this calculator compute?
Given a positive object height and an elevation angle in degrees between 0 and 90 exclusive, it returns the horizontal ground distance as height divided by tan of the angle.
What formula does it use?
The angle is converted to radians before evaluating the tangent; the same linear unit as height is used for the distance.
What happens if the elevation angle is 0° or 90°?
At 0° the tangent is zero (infinite distance); at 90° the tangent is undefined.
Can height be negative?
No. Height must be a positive finite number representing the vertical size of the object above eye level. Use a separate depression workflow if the target is below the observer.
What does it cost?
The browser tool is free and runs locally.
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/distance-from-elevation \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"height":50,"angle_deg":30}'const res = await fetch("https://api.kit.forhosting.com/trig/distance-from-elevation", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"height": 50,
"angle_deg": 30
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/distance-from-elevation",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"height": 50,
"angle_deg": 30
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/distance-from-elevation", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"height":50,"angle_deg":30}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"height":50,"angle_deg":30}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/distance-from-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
{
"height": 50,
"angle_deg": 30
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.distance_from_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
Angles at or outside the open interval (0, 90) and non-positive heights are rejected with a clear invalid_input error, because tan(0) is zero and tan(90°) is undefined. 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 or negative height is illegal because this model treats height as a positive object size, not a signed offset. An angle of zero would force division by tan(0) equals zero and imply an infinite standoff; an angle of ninety degrees places the observer at the foot of a vertical line where the tangent is undefined. Wire the free browser tool for quick sanity checks, then call the identical contract from scripts when you need bulk standoff recovery without reimplementing the open-interval gate in every language. Provide two required finite numbers: height (aliases rise, vertical, h, object_height) as a strictly positive vertical length in any consistent linear unit, and angle_deg (aliases angle, elevation, elevation_angle, theta) as the elevation angle in degrees strictly between zero and ninety exclusive. Missing fields, non-numeric strings, NaN, and Infinity are rejected with invalid_input and are not charged. After parsing, the service checks that height is greater than zero and that angle_deg lies in the open interval (0, 90). On success the JSON response echoes the normalized height and angle_deg, returns angle_rad as the converted elevation in radians, returns tan_angle as the tangent used in the division, returns horizontal_distance in the same linear unit as height, and includes method as the string height_over_tan_elevation for documentation in logs and teaching UIs. Example checks: height fifty and angle thirty degrees yield roughly eighty-six point six horizontal units; height one hundred and angle forty-five degrees yield one hundred; angle zero or ninety fails with an error message that names angle_deg.
Where distance-from-elevation shows 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 horizontal standoff from known object height and elevation angle, and reject 0° or 90° angles with a clear invalid_input error.
Sight-line and game helpers
Place an observer or camera at the correct ground range for a given object height and look-up pitch using the same pure formula in browser and API.