Vertical Distance Calculator
How far is it from here to the top? The answer depends on what you can measure. If you know both elevations, it is simple subtraction. If you are standing at the bottom with a clinometer, it is trigonometry. If you measured along the slope, it is Pythagoras. This calculator handles all three methods: two elevations, horizontal distance plus angle of elevation, or slope distance plus horizontal distance. Pick the method that matches what you actually measured.
All methods use the same unit for inputs and result. For the angle method, angles between -90 and 90 degrees are accepted: negative angles give a downward (negative) result, and angles of 90 degrees or more are rejected, because the tangent is undefined at 90 degrees and misleading past vertical. The edge cases section further down this page explains why.
Quick Answer
Base camp at 150 m and a summit at 420 m are separated by a vertical distance of 270.00 m, a rise: |420 − 150| = 270. The same height gap comes out of the other two methods with different field data: 50 m of horizontal distance at a 30° angle of elevation gives 28.87 m, and a 50 m slope distance with 30 m horizontal gives 40.00 m. Use whichever pair of measurements you actually have.
Key takeaways
- Vertical distance is the height component only. It is not the distance you walk (slope distance) and not the sum of every climb on a route (elevation gain).
- Three formulas cover the three common data pairs: subtract elevations, multiply horizontal distance by tan(angle), or recover the vertical side with Pythagoras.
- Both elevations must come from the same datum and the same unit, or the subtraction is meaningless before it starts.
- The slope distance is always the longest of the three numbers. If your horizontal entry is longer, the two entries are swapped.
- Quick Answer
- How to use the vertical distance calculator
- The three vertical distance formulas
- Worked example: all three methods, checked by hand
- What competing calculators miss
- Measuring in the field, and the datum trap
- Vertical distance vs elevation gain vs slope distance vs grade
- Angle method edge cases, stated plainly
- Frequently asked questions
- Add This Calculator to Your Website
- References
How to use the vertical distance calculator
Pick the mode that matches your measurements, enter the two numbers, and read the vertical distance with its working shown. Results stay hidden until you click Calculate, and switching modes clears the previous result.
- Two elevations: enter the starting and ending heights, from GPS readings, map contours or floor levels. Depths below your reference point go in as negatives. You get the absolute difference plus a rise or drop label.
- Distance + angle: enter the horizontal distance and the angle of elevation in degrees. This is the mode for tops you cannot reach: a tree, a roofline, a cliff edge.
- Slope distances: enter the slope (total) distance you measured along the ground and the horizontal distance. The tool applies Pythagoras to recover the vertical side.
- Set the unit once: meters, feet, kilometers or miles. Every input and the result share it, and nothing is converted behind your back.
- Copy or share the result from the results box when you need it in a report, a message or field notes.
Each mode validates its own inputs. Blank fields name the missing entry, negative distances are rejected in the angle and slope modes, and the slope mode refuses a horizontal distance longer than the slope distance, with the reason stated: the slope distance is the hypotenuse. Elevations themselves may be negative in the first mode, which is how shafts, wells and below-sea-level terrain are handled.
The three vertical distance formulas
Each mode is one standard result: absolute subtraction, the tangent ratio, or the Pythagorean theorem. The OpenStax right triangle trigonometry chapter states the ratio behind the angle mode directly: tangent = opposite ÷ adjacent, so opposite (the vertical side) = adjacent (the horizontal distance) × tan(angle).
| What you measured | Formula | Watch out for |
|---|---|---|
| Two elevations, y₁ and y₂ | |y₂ − y₁| | Both readings must share a datum and a unit |
| Horizontal distance h, angle θ | h × tan(θ) | Angle in degrees; add instrument height for full object height |
| Slope distance s, horizontal distance h | √(s² − h²) | s must be the longest side; it is the hypotenuse |
The right triangle behind all three modes. Know any two of the three sides, or one side plus the angle, and the vertical side follows.
Coordinate tools solve a neighboring problem. If you have (x, y) points rather than elevations and angles, the full point-to-point distance belongs to our euclidean distance calculator, and our distance calculator covers the general case. This page deliberately isolates only the vertical component, which is the number hikers, builders and surveyors usually need on its own. A close cousin worth knowing is our height and distance calculator, aimed at object-height problems from observation points.
Worked example: all three methods, checked by hand
Three field situations, three answers, every number reproducible in the calculator above with the pre-filled values. Switch modes and click Calculate to match each line.
The slope example is the classic 3-4-5 triangle scaled by ten, which is why it lands on a round number. The angle example is the one to sanity-check your clinometer against: at 45° the vertical distance exactly equals the horizontal distance, because tan(45°) = 1.
What competing calculators miss
Each ranking tool covers exactly one method and pretends the others do not exist. Bravecalculator, the top result for this keyword, only does elevation subtraction. Calculatorultra only does the Pythagoras form. Calculatorcorp only does coordinates. A hiker with a clinometer and a surveyor with two GPS readings have different problems, but the keyword serves both, and a single-method page sends one of them away.
The surveying-instrument pages go to the opposite extreme: theodolite and gradienter tools bury a simple height difference inside instrument heights, staff readings and reduced levels that most visitors never asked for. The grade calculators frame everything as a percentage slope for drainage work, which answers a different question. None of the general tools offers copy or share on the result, either. This tool puts all three everyday methods behind one set of buttons, shows the substituted numbers under every answer, and keeps the instrument-heavy cases out.
Measuring in the field, and the datum trap
Good inputs matter more than the arithmetic. For elevations, a GPS receiver or barometric altimeter is the usual source; for the angle method, a clinometer or a phone inclinometer app; for distances, a laser rangefinder, a tape or a measuring wheel.
The trap is mixing elevation sources. Elevations are heights above a datum, and datums differ. US map elevations from the USGS National Map elevation program are referenced to NAVD 88 in decimal meters, while older maps and some local surveys still carry NGVD 29 or a local datum, and coastal work adds tidal datums such as mean sea level, defined by NOAA Tides and Currents datum sheets. Two heights from different datums can differ by a metre or more before any terrain is involved, and subtracting them manufactures a vertical distance that does not exist. Survey crews avoid this by tying both points to published bench marks, the practice behind the USGS high water mark surveys. For everyday work the rule is simpler: read both elevations from the same map, the same GPS session or the same survey, and the subtraction is honest.
For the angle method, remember what the tangent actually measures: the height above your instrument, not above the ground. Stand 50 m from a tree, read 30°, get 28.87 m, then add your eye height of about 1.6 m if you want the tree’s full height of about 30.5 m. The tool reports the triangle; the ground offset is yours to add.
Vertical distance vs elevation gain vs slope distance vs grade
Four quantities get confused constantly, and only one of them is this page’s answer. Vertical distance is the single straight height difference between two points. Slope distance is the hypotenuse you travel along the ground, always longer. Elevation gain is a route total: every upward stretch added together, ignoring the drops, which is why a hike can honestly report 700 m of gain between a trailhead and a summit only 270 m above it.
Grade is the ratio form of the same triangle: vertical distance ÷ horizontal distance × 100, expressed as a percent. A 40 m vertical over 30 m horizontal is a 133% grade, steep enough to make the point that grade and angle are not interchangeable either: that slope’s angle is arctan(40 ÷ 30), about 53°. If grade is the number your project actually specifies, our average slope calculator works in that language directly.
Angle method edge cases, stated plainly
The angle mode applies the tangent exactly as entered within its accepted range, and rejects angles outside it rather than returning a nonsense number. A negative angle is an angle of depression, so the result is negative: 50 m at −30° returns −28.87 m, which is correct behavior if you are sighting downward from a cliff or a tower. An angle of 90 degrees or more is rejected with an error message: at exactly 90 degrees the tangent is undefined, and past vertical the tangent changes sign, so a 120 degree entry would otherwise return a misleading −86.60 m. The same guard rejects −90 degrees and below, where the sighting is straight down. If you see the range error, check for a mistyped angle before re-entering it.
Frequently asked questions
It depends on the method. From two elevations, no: the tool returns the absolute difference and labels it a rise or a drop. From the angle method, yes: a negative angle is an angle of depression, so the result comes back negative. Angles of 90 degrees or more are rejected rather than returning a negative value.
Elevation gain adds up every upward stretch of a route, while vertical distance between two points is one straight difference. On a rolling trail that climbs 40 m, dips 15 m and climbs 30 m, total gain is 70 m but the vertical distance from start to finish is only 55 m.
Match the method to your gear. GPS or a barometric altimeter gives two elevations, a clinometer or phone inclinometer gives an angle over a measured horizontal distance, and a laser rangefinder or measuring wheel gives slope and horizontal distances. Elevations read from maps should share one datum, such as NAVD 88, before you subtract them.
No. Slope distance is the hypotenuse, the line you actually walk or measure along the ground. Vertical distance is only its height component. The two are equal only on a perfectly vertical face, and the slope method in this calculator separates them with Pythagoras.
When the top is unreachable: a tree, a building across the street, a cliff face. Measure a horizontal distance you can walk, sight the angle of elevation to the top, and let the tangent do the climbing. Add your eye or instrument height afterward if you need the full height from the ground.
Meters, feet, kilometers or miles, chosen once in the unit selector. Both inputs and the result share that unit, and the tool does not convert between units. Mixing a horizontal distance in feet with an elevation in meters gives a meaningless answer.
The tangent of 90 degrees is undefined, so the tool rejects the entry with an error message instead of returning a number. The same guard rejects any angle of 90 degrees or more, and any angle of -90 degrees or less. Real sighting angles for the angle method sit between -90 and 90 degrees, and a negative angle means you are sighting downward.
Because the slope distance is the hypotenuse, it must be at least as long as the horizontal distance. If the horizontal entry is larger, the tool answers that the horizontal distance cannot exceed the slope distance. Swap the two entries: the longer tape measurement is almost always the slope distance.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- OpenStax, Rice University. Right Triangle Trigonometry (Precalculus 2e, Section 5.4) (tangent = opposite ÷ adjacent; right-triangle trigonometry for measuring inaccessible heights). Accessed October 24, 2026.
- OpenStax, Rice University. Precalculus 2e, Chapter 5: Trigonometric Functions (chapter source for the right triangle ratios used by the angle method). Accessed October 24, 2026.
- OpenStax. Right Triangle Trigonometry (Algebra and Trigonometry) (key equations for sine, cosine and tangent; unknown heights from a known side and angle). Accessed October 24, 2026.
- U.S. Geological Survey. The National Map: Elevation (National Elevation Dataset: NAD 83 horizontal datum, NAVD 88 vertical datum, elevation units in decimal meters). Accessed October 24, 2026.
- U.S. Geological Survey, Washington Water Science Center. FEMA High Water Marks: Western Washington Flood, January 2009 (elevations tied to NAVD 88 reference marks and survey-grade GPS in field practice). Accessed October 24, 2026.
- National Oceanic and Atmospheric Administration, Tides and Currents. Datums for 8573927, Chesapeake City, MD (tidal datums alongside NAVD 88 at one station: why heights from different datums are not interchangeable). Accessed October 24, 2026.
- Stewart, J. Right Triangle Trigonometry (course notes after Stewart, Section 6.2) (six trigonometric ratios; angle of elevation and angle of depression definitions). Accessed October 24, 2026.
