Google Timeline Mileage Calculator
Calculate driving mileage from your Google Timeline data. Generate downloadable mileage logs with per-trip details, daily and monthly summaries. All processing happens in your browser — your data never leaves your device.
How to Get Your Timeline Data
Export your Google Timeline location history using one of these methods. If one does not work, try another.
Visit takeout.google.com → Choose Location History (Timeline) → Export as JSON
Open Google Maps → Settings → Location → Location Services → Timeline → Export Timeline
Open Google Maps → Settings → Personal Content → Export Timeline data
For the most accurate mileage data, Semantic Location History files (monthly JSON files like 2023_JANUARY.json) work best, as they contain labeled activity segments with driving classifications.
All mileage calculations happen entirely in your browser. Your location data never leaves your device and is not sent to any server.
What Is the Timeline Mileage Calculator?
The Timeline Mileage Calculator is a free browser-based tool that extracts driving trip data from your Google Timeline export files and calculates the total distance traveled. It identifies driving-related activity segments — including car trips, bus rides, train journeys, and motorcycle travel — and generates a structured mileage log with per-trip details.
Unlike server-based tools, everything runs in your browser. Your sensitive location data is never uploaded anywhere. You get instant results with full privacy, and the generated CSV mileage log can be used for expense reports, tax documentation, or personal record-keeping.
How Mileage Is Calculated
The calculator uses the Haversine formula to compute great-circle distances between consecutive GPS coordinates in each driving segment. This is the standard method for calculating distance between two points on a sphere (the Earth).
For each driving segment identified in your Google Timeline data, the tool sums the distances between all recorded waypoints along that segment. The result is a straight-line approximation — actual road distance will typically be 10-30% higher due to road curvature, elevation changes, and detours not captured by GPS point spacing.
Jumps greater than 500 km between consecutive points are automatically excluded to avoid counting GPS glitches or teleportation artifacts in the data.
Using Mileage Logs for Tax Deductions
In the United States, the IRS allows a standard mileage deduction for business use of a personal vehicle. For 2024, the rate is 67 cents per mile. To claim this deduction, you need a mileage log that records the date, destination, business purpose, and distance for each trip.
While Google Timeline data can provide the date and distance for each driving segment, it does not distinguish between business and personal trips. You would need to annotate the exported CSV with business purpose and destination information. The IRS also requires that records be kept contemporaneously — meaning at or near the time of each trip — so a retrospective log from Google Timeline is best used as a supporting document rather than your sole record.
For IRS-compliant mileage tracking going forward, consider using Dawarich to automatically log trips as they happen.
What Happened to Google Maps Timeline?
In late 2024, Google discontinued the web-based version of Google Maps Timeline and transitioned all location data to on-device storage on users' phones. Only the most recent 90 days of data were migrated — all older location history was permanently deleted unless users had manually backed it up before the deadline.
This change left many users without access to years of location history that they had relied on for mileage tracking, travel memories, and expense documentation. If you managed to export your data via Google Takeout or the Timeline export feature before the transition, this calculator can help you extract the mileage information from those files.
For more details, see our guide on migrating from Google Location History.
Accuracy and Limitations
- GPS precision — Google Timeline typically records locations every few seconds to minutes, depending on device activity. Gaps between readings mean some segments of a trip are interpolated rather than precisely measured
- Activity classification — Google uses machine learning to classify activity types. Misclassifications happen — a slow drive in traffic might be labeled as cycling, or a bus ride as a car trip
- Straight-line distances — The Haversine formula gives the shortest path between two points on the Earth's surface. Real roads are longer due to curves, hills, and routing
- Missing data — Periods where your phone was off, in airplane mode, or had Location History disabled will have no data
- Export format matters — Semantic Location History files contain the most detailed driving data. Raw Records.json files may lack activity type labels
Related Tools
- Google Timeline Visualizer — View your complete location history on an interactive map
- GPS Heatmap Generator — Create heatmaps from GPX, FIT, TCX, and other GPS files
- GPX Track Merger — Combine multiple GPX files into one
- Photo Geodata Extraction — Extract GPS coordinates from your photos
- GeoJSON to GPX Converter — Convert your location data to GPX format
Read more: Migrating from Google Location History
Frequently Asked Questions
Is it safe to upload my Google Timeline data?
Absolutely. This tool runs 100% in your browser using client-side JavaScript. Your Google Timeline files are never uploaded to any server, never leave your device, and are discarded the moment you close or refresh the page. There is no backend, no database, and no tracking of your location data. The tool is part of the Dawarich open-source ecosystem, so you can inspect the source code yourself to verify.
How accurate is the mileage calculation?
Distances are calculated using the Haversine formula, which computes the great-circle distance between GPS coordinates. This gives straight-line approximations between recorded points, which typically underestimates actual road distance by 10-30% depending on route complexity. Highways will be more accurate than winding city streets. For IRS mileage deductions, the standard practice is to use odometer readings or a dedicated mileage tracking app for precise figures, but this tool provides a solid estimate for planning and review.
Can I use this for tax deductions?
This tool generates a mileage log that can serve as a supplementary record for tax purposes. However, the IRS requires contemporaneous records — meaning mileage should ideally be logged at the time of each trip, not reconstructed later. Google Timeline data can support your records but may not be sufficient as the sole source. Consult a tax professional for guidance specific to your situation. For ongoing IRS-compliant mileage tracking, consider using Dawarich to automatically log your trips in real time.
What driving activities does it track?
The calculator identifies driving-related activity types from Google's classification system: IN_PASSENGER_VEHICLE (car trips), DRIVING, IN_BUS, IN_TRAIN, IN_SUBWAY, and MOTORCYCLING. These activity types are assigned by Google based on speed, movement patterns, and sensor data. The accuracy depends on how well Google classified your activities — occasionally walking or cycling may be misclassified as driving or vice versa.
Can I filter by date range?
Yes. After uploading your files, you can set a start date and end date to filter your mileage log to a specific period. This is useful for generating quarterly or annual mileage reports, isolating business travel periods, or comparing mileage across different timeframes. The monthly and daily summaries will also reflect only the filtered date range.
What format is the CSV export?
The CSV file includes columns for Trip #, Date, Start Time, End Time, Activity Type, Distance (in your chosen unit), and Duration. Each row represents one driving segment identified in your Timeline data. The file ends with a total row summarizing the overall distance and trip count. The CSV can be opened in Excel, Google Sheets, or any spreadsheet application for further analysis.
Why are some trips missing?
Several factors can cause missing trips: (1) Google Timeline only records data when Location History is enabled on your device — any periods where it was off will have no data. (2) Short trips or trips with poor GPS signal may not generate enough data points. (3) Google may not have classified certain movement as driving, especially at low speeds. (4) If you exported using the newer phone-based method, you may only have the last 90 days of data due to Google's 2024 policy change. (5) Some export formats contain less detail than others.
Looking for a Google Timeline Replacement with Built-in Mileage Tracking?
Dawarich is an open-source location tracking platform that automatically logs every trip, calculates driving distance, and gives you full control over your data. Import your Google Timeline export, track ongoing mileage from your phone, and generate reports anytime — all self-hosted or in the cloud.
Try Dawarich Free for 7 Days