Why does adding up your hikes by hand not match your yearly total?
It is almost never a real discrepancy â it is rounding, showing up in a place most people never think to look for it. Every hike shows a tidy distance on its card, something like 5.2 km, and that tidy number is a rounded version of a more precise figure the app actually stored. Add up a dozen of those rounded numbers by hand and you are adding up a dozen small approximations, each one a hair off from the real figure it stands in for. The app's own yearly total is not built that way â it works from the precise numbers directly, before any of them were ever rounded for display.
The short answer
The number on each hike's card has already been rounded to something readable â one decimal place, usually â before you ever see it. Add a run of those rounded numbers together by hand and the total inherits every small rounding step along the way. The app's yearly total skips that step entirely: it sums the full-precision distance behind each hike, then rounds once, at the very end, for display. Two different orders of operations â round-then-add versus add-then-round â do not always land on exactly the same number, and that is the entire gap.
What a displayed distance actually is
A GPS track does not measure in tidy, round figures. It is built from a long list of coordinate points, and distance comes from measuring the straight-line gap between each consecutive pair and adding all of those small gaps together. The result is a number with far more precision than anyone needs to look at on a hike's summary card â something closer to 5.187 km than 5.2 km. Rounding that down to one decimal place is not a mistake or a shortcut; it is simply the right amount of precision for a person glancing at a card, where a third decimal place would only add clutter without adding anything useful to look at.
The full-precision figure does not disappear once the rounded one is shown. It is still the number stored behind that hike â the rounding only happens at the moment of display, not to the underlying data.
Why rounding a dozen small numbers does not cancel itself out
Rounding to one decimal place moves any given number by, at most, half of that smallest unit â a five-hundredth of a kilometre either way. Intuitively that sounds like it should average out to nothing over enough hikes, with roughly as many numbers rounding up as rounding down. In practice it gets close to that, but rarely lands on exactly zero, for the same reason a coin flipped a dozen times rarely lands on exactly six heads and six tails. The rounding on any one hike is essentially unrelated to the rounding on the next one, so the small errors partly cancel and partly do not, leaving a residual gap that tends to be a few tenths of a kilometre across a year's worth of hikes â small, but real, and large enough to notice if you are comparing a hand-typed sum against the app's own figure.
Why the gap grows with the count of hikes, not the distance walked
This is the detail that makes the mismatch easy to misdiagnose. It has nothing to do with how far any individual hike was, or how far the year added up to overall â a year of five long hikes carries far less rounding error than a year of fifty short ones, even if the fifty short ones cover less total ground. Every hike contributes one rounding step to a hand-added total, regardless of its length, so the number of hikes in the sum is what determines how large the eventual gap can get. A frequent walker with a long history of short outings will see a bigger gap than an occasional hiker with a handful of long ones, purely because there are more rounding steps stacked into the total.
Getting an exact total instead of an approximate one
The fix is not to add more carefully by hand â it is to add the underlying numbers instead of the rounded ones on display. A CSV export lists a precise distance for every recorded hike as its own column, ready to be summed in a spreadsheet with a single SUM formula over the whole year, the same approach covered in the guide to totalling a year's hiking distance. That sidesteps the rounding gap completely, because nothing gets rounded until the very last step, if at all â the spreadsheet is working from the same full-precision figures the app's own yearly total is built from, rather than from what was rounded for a card.
Things that trip people up
- Assuming a mismatch of a few tenths of a kilometre means a hike went missing or got double-counted â it is far more often ordinary rounding drift than a genuinely missing entry.
- Expecting the gap to shrink by re-adding the same rounded numbers more carefully â careful arithmetic on rounded inputs still produces a total built from rounded inputs; the rounding, not the addition, is the source of the gap.
- Assuming the app's yearly figure is the one doing the rounding wrong â it is normally the other way round, since the yearly total works from full-precision figures and the per-hike cards are the ones simplified for reading at a glance.
- Expecting the gap to scale with total distance â it scales with how many separate hikes were added together, which is why a year of many short walks can drift further than a year of a few long ones.
Where TrailCam fits in
TrailCam shows a rounded distance on each hike's card for the same reason any app does â a third decimal place is not something anyone reads at a glance. A CSV export of the whole route history lists the full-precision distance for every hike as its own column, so a yearly total added up in a spreadsheet works from the same underlying figures the app uses for its own totals, rather than from what got rounded for display. Export is part of the optional TrailCam Pro upgrade; the app itself is free to download.
Questions
- Is a small mismatch between my hand-added total and the app's yearly figure a sign of a bug?
- Almost always no. It is the ordinary, expected result of adding together numbers that were each already rounded for display, rather than adding the full-precision figures the app itself uses for its yearly total.
- Does the same thing happen with elevation gain?
- Yes, for the same reason. Elevation gain is also rounded for display on each hike's card, so hand-summing a run of those rounded figures can drift slightly from a total built from the full-precision numbers underneath.
- How big is the gap usually?
- Typically a few tenths of a kilometre across a full year of hikes, depending mostly on how many separate hikes were added together rather than on how far any of them were.
- What is the most reliable way to get an exact yearly total?
- Export the route history as a CSV file and sum the distance column in a spreadsheet, rather than adding up the rounded number shown on each hike's card by hand. That works from the same full-precision figures the app's own yearly total is built from.
Recording your own routes
TrailCam is an iPhone app that records your route with GPS, keeps video clips, photos and voice notes pinned to the spot where you took them, and exports the result as GPX 1.1 or CSV. It is free to download.