How Do You Compare Two GPX Tracks?
Load both files into GPX Track Compare: the plan or reference as track A, and the track to check as track B. The tool draws the two on one map, measures how far every point of each is from the other line, and lists each stretch where they part: where B went its own way, and which part of A it missed by doing so, with the place, the length, and how far apart they got. The one setting that matters is the tolerance, the distance inside which two lines count as the same. Set it too tight and ordinary GPS error is reported as differences; too loose and a wrong fork goes unnoticed. The default of 25 meters suits most recordings. Nothing is uploaded: both files are read in your browser.
Three Reasons to Compare

| The question | Track A | Track B | What to read |
|---|---|---|---|
| Did I follow the route? | The plan or the official course | Your recording | The list of differences |
| Where did two riders take different lines? | One rider's track | The other's | The list of differences |
| How well do two recordings of one trail agree? | One recording | The other | The typical distance between them |
The comparison is of position only. The direction of travel and the date do not matter, so a trail ridden the other way on another day still matches wherever the lines coincide.
A Worked Example: The Plan Against the Ride
The example is a planned track of 14.02 km and a recording of the day it was ridden, which came out at 12.36 km. Something was done differently; the question is what, and where.
- Load track A. Open Track Compare and load the plan. A file with a track is read as the track; a file with only a route is read as the route.
- Load track B, the recording. The comparison runs as soon as both are in.
- Read the headline. For the example: "Track B follows track A for 67.9% of its length, and covers 59.0% of track A."
- Look at the map. Track A is the wide blue line and track B the thin red one. Stretches that differ are drawn bold.
- Go through the list. Select a row to zoom the map to that stretch.
The two example tracks, drawn to scale from the files. The numbers are the rows of the list below.
| # | Difference | From | To | Length | Furthest apart | Time (UTC) |
|---|---|---|---|---|---|---|
| 1 | Track B leaves track A | 2.56 km | 3.97 km | 1.41 km | 353 m | 15:08:31 |
| 2 | Track B leaves track A | 6.67 km | 9.23 km | 2.56 km | 1.05 km | 15:22:14 |
| 3 | Part of track A not on track B | 2.52 km | 3.96 km | 1.44 km | 347 m | — |
| 4 | Part of track A not on track B | 6.64 km | 10.94 km | 4.30 km | 1.59 km | — |
From and To are distances along the track named in the row, so rows 1 and 2 are measured along the ride and rows 3 and 4 along the plan.
Reading the List: Differences Come in Pairs
Four rows, but only two things happened. Whenever one track goes its own way, it shows up twice: once as the stretch where B left A, and once as the part of A that B missed by doing so. Match them by where they start.
- Rows 1 and 3 are a detour. Both begin about 2.5 km in. The rider left the plan for 1.41 km and got as far as 353 m from it, missing 1.44 km of the planned line. The two lengths are nearly equal, so this was a different line of about the same length: the other side of a wash, a parallel track.
- Rows 2 and 4 are a shortcut. Both begin about 6.6 km in. The rider covered 2.56 km where the plan ran 4.30 km, cutting 1.74 km off, and was 1.05 km from the plan at the widest. That one cut is nearly all of the 1.66 km by which the ride is shorter than the plan.
The rule: if B's stretch is longer than the part of A it replaced, it was a detour that cost distance. If it is shorter, it was a shortcut.
A row with no partner means a track simply stops short. A recording that was started 2 km after the start of the plan gives no "B leaves A" rows at all and one "Part of track A not on track B" from 0.00 to 2.02 km: B follows A for 100% of its own length, and covers 85.6% of A.
The time column gives the moment each difference began, when track B has timestamps. Here the shortcut began at 15:22:14, 22 minutes into the ride, which is where to look in a video or a set of notes. Download CSV saves the list with the start and end coordinates of each stretch.
Choosing the Tolerance
No two recordings of the same line are identical. Every GPS position is a few meters out, and two receivers, or one receiver on two days, are out in different directions. The tolerance is how you tell the tool to ignore that.
To see what it does, compare the plan with a second recording that followed it faithfully the whole way. The summary gives the typical distance between the two as 3.2 m, and the furthest any point strays as 11 m. That is ordinary GPS disagreement and nothing else. Now change the tolerance:
| Tolerance | What the tool reports for two tracks on the same line |
|---|---|
| 25 m | "The two tracks follow the same line: no point of either is more than 25 m from the other." |
| 10 m | 4 stretches where track B leaves track A, each about 120 m long and 10 or 11 m away |
| 5 m | 30 stretches where B leaves A and 37 parts of A not on B. B "follows" A for 51.8% of its length |
None of those differences is real. A tolerance below the noise in the recordings reports the noise. So read the typical distance first, and keep the tolerance several times larger than it. When the rows in the list are all short and all "furthest apart" by about the tolerance, the setting is too tight.
Loosening it costs little. On the plan-against-ride example, 10 m, 25 m, and 100 m all find the same four differences; only their lengths change by a few hundred meters, because a wider tolerance waits longer before deciding the tracks have parted. GPS Accuracy Explained covers how large the error gets under trees and in canyons, where 50 to 100 m is the better choice.
When the Plan Was Drawn with Few Points
A plan clicked out on a map with a point every kilometer is a string of straight lines. The trail it stands for bends between those points, and a rider who stays on the trail is, quite correctly, some distance from the straight lines.
Take the same faithful recording and compare it with a 16-point version of the plan. At 25 m the tool reports that track B follows track A for only 34.9% of its length, with 11 stretches where it "leaves", a typical distance of 39 m, and a furthest of 197 m. The rider did nothing wrong. At 100 m it is 89.1% and 3 stretches. At 250 m the tool says the two follow the same line.
Three ways to deal with it, best first:
- Compare against a detailed track. If the plan came from a planner that follows trails, export it as a track, not a route.
- Draw the plan with more points. In the Route Planner, click along the bends. How to Plan a Route on a Map covers it.
- Raise the tolerance to 250 m or more, and accept that it will now miss anything smaller.
Before You Compare
- Both files must be GPX. Exporting GPX from Strava, Komoot, and AllTrails shows where each keeps the download.
- Trim the ends. If the recording starts at your front door and the plan at the trailhead, the drive shows up as a difference. Cut it off first in the GPX Editor.
- One line per file. All the tracks and segments in a file are compared as one line. To compare a single day out of a multi-day file, split it out first; to compare a whole trip recorded in pieces, join them with the GPX Merger.
- Add the waypoints. A third file, GPX or CSV, puts named places on the same map, so a difference can be read as "left the plan at the junction".
What a Comparison Does Not Tell You
- Who was faster. It compares where two tracks went, not how long they took. The GPX Analyzer gives the time and speed of one track at a time.
- Whether a waypoint was reached. For a course with waypoints that must be passed within a set distance, use the Waypoint Clearance Checker.
- Which track is right. It reports that two lines differ. Where the plan was wrong and the rider was on the trail, the list looks the same as the other way round.
Frequently Asked Questions
Which file should be track A?
The one you are measuring against: the plan, the official course, or the reference recording. The comparison runs both ways whichever you choose, and Swap A and B exchanges them without reloading.
Does it matter which direction each track was travelled?
No. Only positions are compared. A track ridden in the opposite direction matches the original wherever the two lines coincide.
Can I compare a recorded track with a planned route?
Yes. A route is compared along the straight lines between its points, so a route with few points needs a wide tolerance, as shown above.
Why are two recordings of the same trail a few meters apart?
Because every GPS position has a few meters of error and no two recordings make the same error. The typical distance in the summary shows how large the disagreement is.
Can I compare more than two tracks?
Two at a time. To compare several riders, keep the course as track A and load each rider in turn as track B.
Can I save the result?
Download CSV saves the list of differences, with the distance, length, largest separation, times, and the coordinates where each begins and ends.
Are my files uploaded?
No. Both tracks and any waypoint file are read and compared in your browser. The map loads its background tiles, and nothing of yours is sent.