Google Timeline, Takeout, GPX and CSV to a mileage log

Mileage Log from Location History

Rebuild the trips of past months from a Google location-history export, name your regular places once, mark each trip business or personal with a purpose, and get a log with miles by month and the IRS standard mileage rate of each trip's own date.

This is a reconstruction, not tax advice. IRS Publication 463 expects mileage records that show the date, distance, destination and business purpose of each business trip, and says a record kept at the time has more value than a statement prepared later. This page builds a log from location records you review trip by trip; whether it satisfies the rules for your return is for you and your tax adviser. Nothing is uploaded: the files are read in this tab.

1. Location files

Choose location-history files

JSON from Google Maps Timeline or Takeout, GPX tracks, or a CSV of points; several files at once

Read: Timeline.json from the Android export, location-history.json from the iOS export, Takeout's Records.json and Semantic Location History months, GPX, and CSV with time, latitude and longitude columns. Field names for the newer Timeline exports are this page's reading of them, checked only against made-up sample files, so confirm the trips you get. Files beyond what the formats allow are cut at 5 million fixes. Unzip a Takeout archive first. The example is invented: five made-up places and nine days of trips.

Mileage Log from Location History

Operator: Abdulla Al Fahad. How tools are built and checked

On 30 June 2026 the IRS business mileage rate was 72.5 cents; on 1 July it was 76. A driver who never kept a log, but whose phone recorded where the car went, can rebuild the year from that history, as long as every trip is priced at the rate of its own date and every trip is confirmed as business or personal by the person who drove it. This page does that: it finds the trips in a location export, asks you to name your regular places, and writes the log.

Key features

  • Reads Google Maps Timeline exports (Android Timeline.json and iOS location-history.json), Takeout's Records.json and Semantic Location History months, GPX tracks, and CSV files of time, latitude and longitude
  • Takes trips from vehicle activity segments, using the export's own distance when it has one, and from raw location fixes by detecting stops
  • Measures tracks as geodesic distance on the WGS84 ellipsoid, and flags trips measured only as a straight line between two ends
  • Prices each business trip at the IRS rate for its date, from 2011 to the end of 2026, or at a rate per mile or kilometre that you enter

How trips are found in a location export and how the IRS rate is chosen by date

The files differ more than their names suggest. Takeout's Records.json is one long array of fixes with latitudeE7, longitudeE7, accuracy and a timestamp. A Semantic Location History month holds timelineObjects, each an activitySegment with a start and end location, a distance and an activity type, or a placeVisit with a location. The on-device Timeline exports hold segments with an activity (start, end, distanceMeters and a topCandidate type), visits with a place id, and timelinePath points, in text such as 37.42°, -122.08° or geo:37.42,-122.08. Takeout for accounts that moved to on-device Timeline can contain only a note about encryption, in which case the Export option in the Maps app's Timeline settings is the source.

The field names for the on-device exports are this page's reading of them and were tested only against made-up sample files with the same shape. Check the first few trips against a calendar before trusting a whole year. IRS Publication 463 expects a mileage record to show, for each business trip, the date, distance, destination and business purpose, and it says a record made at or near the time carries more weight than a statement prepared afterwards. A log rebuilt from location history is the second kind; whether it serves for your return is a question for you and your tax adviser.

How it works

A stop is a run of fixes that stay within a radius of the first fix (150 m by default) for at least ten minutes. A trip is the track between two stops, measured by summing geodesic steps and ignoring steps under 15 m. Fixes worse than 100 m accuracy are ignored, fixes faster than 400 km/h are dropped as errors, and movement slower than 12 km/h on average is taken as walking and faster than 200 km/h as a flight.

Trip ends are grouped into places: each end joins the nearest existing place within the radius, or starts a new one. You name each place and mark it business, personal or home, and the Type column is pre-filled from the places and a rule (business when the trip ends at a business place, or starts or ends at one). Every Type and every purpose can be changed trip by trip, and a trip can be left out.

Common use cases

  • A freelance photographer who drove to forty client shoots in 2025 loads the year's Records.json, names six venues and gets a log with the date, place and purpose of each shoot.
  • A sales rep whose employer reimburses mileage per kilometre selects a custom rate and exports the CSV for the expense system.
  • A tax preparer asks a client for the Timeline export from the phone and rebuilds the first half of 2026 across the rate change, so trips before and after 1 July use different rates.
  • A courier loads two GPX tracks from a bike computer and a phone and lets the page merge a trip that appears in both.

How to use this tool

  1. Add the files, or Load example, and tick the movement types that count as car trips; walking and cycling are off unless you tick them.
  2. Press Find trips, then name your places and mark each business, personal or home.
  3. Walk through the trips, correct the Type and the purpose, and tick Skip for rides that were not yours.
  4. Choose the IRS rate or enter your own, read the monthly totals, and export the workbook, PDF or CSV.

Example

Load example: an Android-style Timeline file of eight segments and a Records.json with one day of fixes, all invented; Office marked Personal (a regular workplace), Client A and Client B business, rule: either end business

Segments from 29 June to 4 July 2026, one of them walking, plus fixes on 2 July with a stop at home, a stop at Client B and a stop at home again

Log and totals

9 trips: 7 vehicle segments (the walk is left out) and 2 found from fixes at 14.030 and 14.033 miles, where the straight line is 14.031
30 June Office to Client A, 5.958 mi at 72.5¢ = $4.32; 1 July the same trip at 76¢ = $4.53
Business 51.9 mi, personal 11.2 mi, business share of logged trips 82.2%
June business 11.9 mi = $8.64; July business 40.0 mi = $30.38; total $39.02

Common pitfalls

Where an export has only two end points, the distance is a straight line, which is shorter than the road. Those trips carry a flag, and for a log you rely on, compare them with a map.

The business share shown is of the trips found in your files. Drives the phone did not record, or days with location history off, are not in the denominator, so it is not the business-use share of the car for the year.

Commuting between home and a regular workplace is generally not deductible. Marking a place Business makes the page suggest business for every trip to it; set your regular workplace to Personal or change those trips.

Dates after 2026 and before 2011 have no rate in the table. Those trips are left out of the amount and counted in a warning, and you can use your own rate for them.

  • Pick the time zone you lived in. Records.json writes UTC, and a late-evening drive can land on the next calendar day otherwise.
  • Raise the shortest-trip setting to 800 metres if parking-lot shuffles show up as trips.

Common errors and how to fix them

The file holds no timeline data.
Takeout may have given only a note about encryption. Use Export in the Timeline settings of the Google Maps app, or a Takeout that includes Records.json.
No trips were found with these settings.
Tick the movement types in the list, lower the shortest trip or the stop time, or check that the file covers the period you expect.
That is not a time zone name.
Type an IANA name such as America/Chicago or Europe/Berlin, or choose the browser's zone from the list.

Best practices

  • Fill in the purpose of each business trip while you still remember it, and keep the calendar or invoices that show where you went.
  • Export the workbook as well as the PDF; it lists the IRS rate and its source for every period beside the log.

IRS rates by date

The business standard mileage rate in cents per mile is 56 for 2021, 58.5 from 1 January to 30 June 2022 and 62.5 from 1 July, 65.5 for 2023, 67 for 2024 and 70 for 2025. For 2026 it is 72.5 until 30 June (Notice 2026-10, IR-2025-128) and 76 from 1 July to 31 December (Announcement 2026-11, IR-2026-29). Earlier rows back to 2011 and the release number for each are in the workbook. They were read from the IRS standard mileage rates page on 17 November 2026; check that page for any later change.

Frequently asked questions

Which rate does a trip that crosses midnight on 30 June use?

The one for the date the trip started, in the time zone you chose. Each trip is priced once, whole, at the rate for its start date.

Why are two trips in different files merged?

Trips that start within two minutes of each other and begin and end within 150 metres of each other are treated as the same trip, and the copy with an exported distance is kept.

Can it log odometer readings?

You can type the readings for each trip and they are printed in the log. Nothing is calculated from them, because location history does not know the odometer.