Travel, Location & Geography Tools

Elevation Gain Calculator

Calculate total ascent, descent, highest and lowest points and gradient from a GPX track or elevation list, with a smoothing threshold to remove GPS noise and an elevation profile chart.

  • Ascent and descent
  • Profile chart
  • Steepest sections
Runs in your browser

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics.

Elevation gain workspace

1 Your track

Examples:

Drop a .gpx file, or (up to 20 MB). It stays on this device.

A climb or drop counts only once it passes this height. 0 counts every wiggle.

2 Ascent and descent

Load a GPX file, paste a track or a distance/elevation list, or pick an example.

What the Elevation Gain Calculator does

This calculator reads a GPX track, or a simple list of distance and elevation pairs, and gives you the total ascent and descent, the highest and lowest points, the net height change, the average climbing rate and the steepest sections, with an elevation profile chart.

It uses a noise threshold so that the few-metre jitter in GPS and barometric elevation does not inflate the totals, and it shows the unfiltered figure next to the filtered one so you can see how much the threshold removed. The file is read in your browser and is never uploaded.

How to use it

  1. Drop a .gpx file exported from a watch, phone app or route planner, or paste its text. The calculator uses track points, or route points if the file has no track.
  2. Alternatively paste a list with one distance and elevation per line, such as 2.5, 340, and choose the units the list uses.
  3. Set the noise threshold. 5 metres suits most recorded GPS tracks; use 0 for a clean planned profile or a surveyed list, and 10 or more for a very noisy phone recording.
  4. Read the totals and the profile, then check the steepest sections table for the parts of the route that will be hardest going up or down.

Reading the results

Total ascent is the sum of every counted climb, not the difference between the lowest and highest points. A route that goes up and down three hills can have far more ascent than its highest point suggests.

The threshold works like hysteresis: after each counted point, the elevation has to move more than the threshold up or down before the change is added. Small bumps that never reach the threshold are ignored, whether they are noise or real.

Gradient is rise divided by horizontal distance, so 10% is 10 m of height in 100 m of travel, about 5.7 degrees. The steepest sections table uses windows of at least 200 m so that single noisy points cannot create an impossible slope.

Worked example: an 8 km ridge walk entered as a list

The list gives elevations every kilometre: 120, 160, 158, 230, 300, 296, 250, 180 and 125 metres. Counting every change, the climbs are 40 + 72 + 70 = 182 m and the drops are 2 + 4 + 46 + 70 + 55 = 177 m.

With a 5 m threshold, the 2 m dip at km 2 and the 4 m dip at km 5 are too small to count. From 160 m the next counted point is 230 m (+70) and then 300 m (+70), so the ascent is 40 + 70 + 70 = 180 m. The descent is 300 to 250 (50), 250 to 180 (70) and 180 to 125 (55), 175 m in total.

The highest point is 300 m at 4 km, the lowest 120 m at the start, and the walk finishes 5 m higher than it began. Ascent per distance is 180 m over 8 km, or 22.5 m per kilometre, an average climbing rate of 2.25%.

Formulas and scoring rules

Counted climb (hysteresis)
if elevation - anchor >= threshold: ascent += elevation - anchor; anchor = elevationDescent is counted the same way in the other direction. With a threshold of 0 every change counts.
Distance between GPX points
haversine on a sphere of radius 6,371,008.8 mWithin about 0.5% of the ellipsoid for walking distances.
Gradient
grade = rise / horizontal run; angle = atan(grade)Shown to one decimal place.
Units
1 ft = 0.3048 m; 1 mile = 1,609.344 m

Limitations: what the result does not prove

  • The result is only as good as the elevations in the file. GPS altitude is usually less accurate than position, and planned routes take their heights from a terrain model with its own resolution.
  • Different apps use different smoothing, so their totals for the same track will not match exactly. Compare routes using the same source and threshold.
  • Distances from GPX coordinates are horizontal. Walking up a slope covers slightly more ground, a difference of under 1% at 10% gradient.
  • The steepest sections are averages over at least 200 m. Short scrambles or steps inside them can be much steeper.

Privacy: where your data goes

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics. Session recording and tag-manager scripts are switched off on this page.

Standards and sources

Frequently asked questions

Why does my watch show a different elevation gain from this calculator?

Watches and apps smooth elevation in their own ways, and some correct GPS heights against a terrain model. Set the threshold to 0 to see the raw sum of the file's heights, then try 3 to 10 metres to see how sensitive the total is.

What noise threshold should I use for a GPX elevation gain?

About 5 metres suits most tracks recorded with a watch or phone. Use 0 for a planned route or a clean surveyed profile, and 10 metres or more for a noisy phone recording in tree cover or between buildings.

Is total ascent the same as the difference between the highest and lowest points?

No. Total ascent adds every climb along the way. A route between two valleys at 100 m over a 600 m hill, then a 400 m hill, climbs 500 m and 300 m - 800 m of ascent - while the height range is only 500 m.

Can I use this for a cycling or running route?

Yes. Ascent, descent and gradient do not depend on how you travel. For time estimates, the hiking time calculator's rules are for walking; cycling and running need different rules.

My GPX file has no elevation - what can I do?

Some route planners export only coordinates. Re-export with elevation turned on, or add heights in a mapping app. You can also paste a distance and elevation list read off a map profile.

How is gradient in percent related to degrees?

Percent grade is rise over run times 100, and the angle is the arctangent of rise over run. So 10% is about 5.7 degrees, 20% about 11.3 degrees, and 100% is 45 degrees.

Last reviewed by the A2Z.Tools team against the sources listed above.

Rate this tool

Was this tool useful? Your feedback helps us improve it.

No ratings yet — be the first to rate this tool.
Your rating (required)
0 / 2000

Please do not include passwords, payment details or other sensitive information.

Your feedback is sent privately to the A2Z.Tools team and will not be posted publicly.