ForHosting KIT · Travel & geography

Net elevation change

For the profile 100, 120, 110, 150, 140 m, the net change is 40 m, yet the route climbs 60 m in total and descends 20 m. You also get the lowest and highest points, the range and the total vertical movement. 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
Elevations
100, 120, 110, 150, 140 m
You get
Sample count
5 m
Start elevation
100
End elevation
140
Min elevation
100

Net elevation change along a trail or road profile is more than the difference between the last sample and the first. Hikers, race directors, and routing engines care about cumulative ascent and descent as well, because a roller-coaster path that finishes at the start elevation still burns energy. This net elevation change calculator accepts an ordered list of elevation samples—meters or feet—walks consecutive differences once, and returns net change, total gain, total loss, min and max elevations, elevation range, and total vertical movement. The algorithm is pure arithmetic with no map tiles, no GPS smoothing, and no network. Use it to score GPX-derived series, validate DEM extracts, or label route cards with honest climb statistics before you publish them to athletes or customers.

What net change, total gain, and total loss mean on a profile

Given ordered elevation samples e0, e1, …, e(n−1) along a route, net elevation change is simply the last value minus the first: end minus start. That single number answers “did the path finish higher or lower than it began?” and is negative when the destination sits below the origin.

It does not describe how hard the path felt. Total gain sums every positive consecutive difference max(0, ei − e(i−1)), so every uphill segment contributes to cumulative ascent even if you later lose the same height. Total loss sums every downhill step as max(0, e(i−1) − ei).

Algebraically, net change equals total gain minus total loss (within floating-point rounding), which is a useful sanity check when you audit GPX or DEM extracts. Elevation range is max minus min across the whole series and captures the vertical span of the terrain even when start and end are equal. Total vertical movement is gain plus loss and is sometimes used as a rough effort proxy when distance is held fixed.

This capability does not apply Kalman filters, spike removal, or GPS-error thresholds: it reports what your samples say. Clean noisy barometric series upstream if you need smoothed trail statistics for race rules or training load models.

Who relies on honest climb figures

Trail-planning apps turn DEM or barometer series into climb badges and difficulty labels before a user commits to a weekend loop. Ultramarathon and gravel-race organizers need reproducible total gain when course maps change and volunteers re-export the same track from different devices. Fitness platforms compare planned versus actual profiles after a ride when the watch sample rate differs from the route planner.

Failed validation does not consume balance.

Hiking and trail difficulty labels

Feed ordered DEM or barometer samples from a GPX track and publish net change, total gain, and total loss on route cards for hikers choosing among loops.

Race course and event maps

Recompute cumulative ascent and descent whenever the official course polyline is revised so athlete packets stay consistent with the measured profile.

How is net elevation change calculated?

Net change is the last elevation sample minus the first. Total gain sums positive consecutive steps; total loss sums absolute negative steps. Identity: net = gain − loss.

Why is total gain larger than net change?

Because intermediate climbs count even when you descend later. A out-and-back that returns to the start has net zero but positive total gain equal to total loss.

Do I need distance or GPS coordinates?

No. Only ordered elevation samples are required. Distance, grade, and map projection are out of scope; compute those separately if needed.

Does unit convert meters to feet?

No. unit is a display label (m or ft).

Does it smooth out noisy GPS or barometer readings?

No. It applies no filtering or spike removal and reports exactly what your samples say. If your track is noisy, clean the series first, especially when the totals feed race rules or training plans.

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/geo/net-elevation-change

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/geo/net-elevation-change \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"elevations":[100,120,110,150,140]}'
{
  "elevations": [
    100,
    120,
    110,
    150,
    140
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geo.net_elevation_change",
  "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, units, response fields, and validation

Fewer than two samples fails because a single elevation cannot define a change. Numeric fields are rounded to twelve decimal places for stable goldens across JavaScript engines. POST a JSON body with elevations, a required array of at least two finite numbers in path order. Aliases samples, profile, values, and heights are accepted and resolved the same way. Each element may be a JSON number or a numeric string; non-finite values, empty slots, and non-numeric tokens fail with invalid_input naming the bad index. On success the body includes sample_count; start_elevation and end_elevation; min_elevation, max_elevation, and elevation_range; net_change; total_gain and total_loss; total_vertical; the echoed unit; and a short formula string restating the identities. Example: elevations [100, 120, 110, 150, 140] yield start 100, end 140, net_change 40, total_gain 60 (20+40), total_loss 20 (10+10), min 100, max 150, range 50, and total_vertical 80. Pair the numbers with your own distance and grade calculations if you need slope percent; this endpoint only measures vertical deltas between consecutive samples.

Where a net elevation change API earns its keep

GIS notebooks that clip elevation rasters along a polyline can call this parse endpoint instead of reimplementing gain and loss in every language binding.

GIS and notebook automation

After sampling elevations along a planned polyline, call the API to obtain gain, loss, and range without reimplementing the delta loop in each language.

What does the net elevation change 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 →