The guide
A GPX File Stores Points, Not Answers: Why Distance and Climb Depend on Who Does the Sums
A track log holds a position, a height and a time for each fix and nothing more, so every distance, climb and pace is an estimate shaped by noise, smoothing and thresholds.
- 4.9 m typical accuracy radius of a phone's GPS fix under open sky
- 13 m vertical error allowed, 95% of the time, by the GPS civil standard
- 0.3% typical ceiling on the error of treating the Earth as a sphere
- 608 m to 424 m climb of one sample track as smoothing goes from off to 300 m
- 1,766 to 67 points the same sample route after a 5 m simplification
Read the full guide Fold the guide
Two apps open the same recording of the same walk and disagree by a hundred meters of climbing. Neither is broken. The file they share never contained a climb. It contained points, and each app did its own arithmetic.
That is the uncomfortable truth about GPX, the format that watches, phones and route planners use to hand a journey to one another. TopoGrafix, which publishes it, describes GPX as a light-weight XML data format for the interchange of GPS data, and the current schema, version 1.1, was released on August 9, 2004. Whatever you think of as the result of a day out, how far, how high, how fast, is missing from it. Those numbers are worked out afterward, by software, from a list of positions that are themselves only estimates. Knowing how the sums are done is the only way to know which digits to trust.
What the file actually holds
A GPX file can carry three kinds of thing. A waypoint is a single named place, in the schema’s words a point of interest or named feature on a map. A route is an ordered list of waypoints, a series of turn points leading to a destination, which makes it a plan and not a record. A track is the record: an ordered list of points describing a path. Tracks are divided into segments, and the schema says why. When reception was lost, or the receiver was switched off, the writer should start a new segment for each continuous span of data. A gap between two segments is therefore a stretch that nobody measured.
Each point is small. Latitude and longitude are given in decimal degrees on the WGS84 datum. Elevation is a separate element, in meters. So is time, which is Coordinated Universal Time, not local time, written in the ISO 8601 form with fractional seconds allowed. The schema states that all measurements are in metric units. Anything more has to travel in an extensions element that borrows from a different schema.
Notice what is absent. No distance. No speed. No ascent. A planned route may carry neither heights nor times, and an honest viewer has to say so plainly instead of filling the blanks with zeros.
Distance is a sum of short straight lines
Distance comes from joining each point to the next and adding up the pieces. Each piece is a great-circle arc, usually computed with the haversine formula, which the Movable Type Scripts reference traces to a 1984 Sky and Telescope article by Roger Sinnott. The formula treats the Earth as a sphere with a mean radius of 6,371 km. The planet is very slightly ellipsoidal, and the same reference puts the cost of ignoring that at errors typically up to 0.3%. T. Vincenty’s 1975 formulae solve the problem on the ellipsoid for lines from a few centimeters to nearly 20,000 km. For a day’s walking, the sphere is not where the error lives.
The error lives in the points. GPS.gov says a GPS-enabled smartphone is typically accurate to within a 4.9 m radius under open sky, and that buildings, bridges and trees make it worse. The performance standard for the civilian GPS service commits to a global average position error of no more than 8 m horizontally, 95 percent of the time. At 5 km/h, the level-ground speed in Tobler’s hiking function, a walker covers about 1.4 m each second. When the uncertainty of a fix is several times the distance between fixes, the recorded line zigzags around the true one, and a zigzag is longer than the path it wraps.
This is not a hunch. Ranacher and four co-authors showed it formally in the International Journal of Geographical Information Science: measurement error causes a systematic bias, so that the distance between two points recorded with a GPS is, on average, bigger than the true distance between them. They tested the claim with a pedestrian carrying a logger around a reference square with sides 100 m long, laid out in an empty parking lot, and with cars sampled once a second.
Noise only adds. That one-way bias is why a long pause at a viewpoint can lengthen a track: the receiver sits still, the fixes wander, and the wandering is counted as walking.
Climb is the noisiest number of all
Height is worse than position, and for more than one reason. The same civil standard that allows 8 m of horizontal error allows 13 m of vertical. A satellite fix also measures from the wrong floor. The W3C Geolocation specification defines the altitude a browser reports as height above the WGS84 ellipsoid, a smooth mathematical surface. Elevation on a map is counted from the geoid, which NOAA describes as a model of global mean sea level and the surface that defines zero elevation. GPX even reserves a field for the height of the geoid above the ellipsoid, so the two can be told apart when a device fills it in.
The deeper trouble is that total ascent is a sum of small differences. An error of a few meters in a 10 km distance is nothing. A height that wobbles by 2 m from one fix to the next produces imaginary climbing at almost every step, and over thousands of fixes the imaginary climbing can outweigh the real hill.
Many watches and bike computers sidestep the satellites and measure air pressure. One research group that built a sensor array around the BMP390 pressure sensor lists its relative accuracy as plus or minus 3 Pa, or 0.03 hPa, and equates that to plus or minus 0.25 m of height. The absolute accuracy in the same table is a coarser plus or minus 50 Pa, or 0.50 hPa, and the reading is tied to the weather.
Run the National Weather Service’s pressure altitude formula for 1013.25 and for 1012.25 millibars and the two answers differ by about 27 feet, a little over 8 m. A front that moves the barometer by three millibars therefore moves the whole profile by about 25 m. A barometer is good at steps and poor at absolute height.
Strava’s help pages state the preference outright: the company considers data from barometric altimeters to be of higher quality than data derived from GPS signals. When a device has no barometer, it uses the recorded positions to look up an elevation for each point in a basemap built from its users’ barometric uploads. Either way it smooths the data before counting, and it notes that some changes may not pass the threshold it uses to decide whether elevation was gained.
A terrain model is no oracle either. The US Geological Survey puts the vertical accuracy of its one-third arc-second elevation model of the conterminous United States at about 0.82 m root mean square error, varying with terrain and land cover.
The effect is easy to see on a track whose true shape is known. The sample route in the tool on this page was drawn in code as a clean loop that climbs 455 m, then roughened with a few meters of drifting error of the kind a phone produces. With smoothing switched off, the climb reads 608 m, a third too much. With a 50 m smoothing window it reads 454 m. At 300 m it reads 424 m, because averaging over that distance flattens real rollers along with the noise. Distance tells a smaller version of the same story: the clean loop is 9.29 km long and the recording says 9.40 km.
So the answer runs from 608 m to 424 m, out of one file. No setting is the honest one. Smoothing trades invented climbing for erased climbing, and the 3 m threshold decides how large a bump must be to count.
Time standing still, and what steep means
Time has a fork of its own. Strava separates elapsed time, the duration from the moment you press start to the moment you finish, coffee breaks and photo stops included, from moving time, which measures how long you were active. For rides it relies on a speed threshold to decide whether you were resting. Any viewer that reports moving time has to pick such a threshold, and because a parked receiver still drifts, the choice changes the answer. On the sample route, 2:27:05 of elapsed time holds 2:19:25 of movement when the cutoff is 1 km/h.
Grade looks simpler than it is. The US Federal Highway Administration defines it as the vertical change in elevation divided by the horizontal distance covered, so a path that gains 2 m over 50 m has a grade of 4 percent. The same guide warns that the figure depends on the length it is measured over. Its running grade is an average along a whole segment, its maximum grade is taken over intervals of about 0.6 m, and it describes a path that averages 5 percent while one section reaches 14. A GPS track cannot resolve 0.6 m. A grade taken from two neighboring fixes is mostly noise, so the tool here measures it across about 100 m.
Grade also explains pace. Waldo Tobler’s hiking function, estimated from data gathered by the Swiss cartographer Eduard Imhof, gives a walking speed of 5 km/h on flat ground and a maximum of 6 km/h on a gentle descent of about 2.86 degrees. Steeper slopes, up or down, are slower. A slow kilometer on a climb is not a bad kilometer.
Fewer points, and what no viewer can recover
A track recorded every second holds far more points than its shape needs. The standard remedy is the Douglas-Peucker algorithm. As the psimpl library’s documentation puts it, the method starts with the single edge joining the first and last vertices and finds the vertex that lies furthest from that edge. It keeps that vertex if its distance is larger than a specified tolerance, then repeats for each new edge until every original vertex is within tolerance of the result. PostGIS, whose ST_Simplify function uses the same algorithm, describes the tolerance as a distance in the units of the data. With 5 m, the sample route shrinks from 1,766 to 67 points.
A line often has to leave GPX for the web, and the usual vehicle is GeoJSON. RFC 7946, the standard that defines it, puts longitude before latitude, allows altitude or elevation as an optional third number, and requires a LineString to have two or more positions. It also offers a sense of proportion: six decimal places of a degree amount to about 10 centimeters, a precision well within that of current GPS systems. Extra digits in a file are not extra accuracy.
A viewer that works from the file alone has hard limits, the one on this page included. It draws the route on a blank base with no map behind it, so it cannot tell you what the line crosses. It has no terrain model, so it cannot swap bad heights for surveyed ones the way a basemap lookup does. It measures horizontal distance on a sphere, not slope distance on the ellipsoid. It cannot repair a gap between segments, because the points that would fill it were never recorded. And its smoothing window, its 3 m climb threshold and its 1 km/h moving threshold are choices, not facts.
None of this makes the numbers useless. It makes them estimates with a method attached. Read distance to the nearest percent and climb to the nearest ten meters, and treat two apps that disagree as two fair readings of the same points.
Sources
Every source consulted for this guide. Links checked October 3, 2026.
- GPX: the GPS Exchange Format TopoGrafix
- GPX 1.1 Schema Documentation TopoGrafix
- Calculate distance and bearing between two Latitude/Longitude points using haversine formula in JavaScript Movable Type Scripts
- Direct and Inverse Solutions of Geodesics on the Ellipsoid with Application of Nested Equations Survey Review, hosted by the NOAA National Geodetic Survey
- GPS Accuracy GPS.gov
- Global Positioning System Standard Positioning Service Performance Standard, 5th Edition U.S. Department of Defense, via GPS.gov
- Why GPS makes distances bigger than they are International Journal of Geographical Information Science, via PubMed Central
- Geolocation World Wide Web Consortium (W3C)
- What is the geoid? NOAA National Ocean Service
- Pressure Altitude National Weather Service
- An Internet of Things Sensor Array for Spatially and Temporally Resolved Indoor Climate Measurements Alexander Rusch and Thomas Rösgen, Sensors, vol. 22, no. 12, 2022, via PubMed Central
- Elevation Strava Help Center
- Moving Time, Speed, and Pace Calculations Strava Help Center
- What is the vertical accuracy of the 3D Elevation Program (3DEP) DEMs? U.S. Geological Survey
- Chapter 4 - Sidewalk Design Guidelines and Existing Practices Federal Highway Administration
- Tobler's hiking function Wikipedia
- Douglas-Peucker psimpl polyline simplification library
- ST_Simplify PostGIS
- RFC 7946 - The GeoJSON Format Internet Engineering Task Force