Pushbuild

A mileage log in Google Sheets that works out the miles for you

A free Google Apps Script that fills in the driving distance for each trip from the From and To addresses using Google Maps, doubles it for round trips, and totals your miles by month.

Short answer: Use a free Google Apps Script that fills in the driving distance for each trip from the From and To addresses using Google Maps, doubles it for round trips, and totals your miles by month. It runs in your own Google account; nothing is sent to us. Setup takes 5 steps: Make a Trips tab; Add your rate; Paste the script; Fill in the miles; See monthly totals.

How to set it up

  1. Make a Trips tab. Add a tab called Trips with these columns from A to F: Date, From, To, Purpose, Round trip, Miles. Type Yes or No in Round trip.
  2. Add your rate. Add a tab called Settings and type your rate per mile in B1. The IRS publishes the standard rate each year; enter the one you use.
  3. Paste the script. Open Extensions, then Apps Script, paste in the code from our email, and save. Reload the sheet and a Mileage menu appears.
  4. Fill in the miles. Type the trips with full addresses, then choose Mileage, then Fill in miles. Every row with an empty Miles cell gets the driving distance, to one decimal place. Rows that already have miles are left alone, so you can type your own.
  5. See monthly totals. Choose Monthly totals. A Totals tab lists each month's miles and the amount at your rate.
Setup, step by step: 5 steps, done in your own Google account.

Want this set up for your business? Free written scope in 20 minutes

Get the script

Download it free

We'll email you the script (Code.gs). It runs in your own Google account; nothing is sent to us.

By continuing, you agree that Pushbuild may email you about this script and related tips. Unsubscribe any time. Privacy

Have us install it for you

We set it up in your Google account in a short Connect session, connect it to your sheet and check that it runs.

Have us install it

Good to know

  • Distances are Google Maps' driving route at the time you run it, which can differ a little from the road you took.
  • If an address can't be found, Miles says Not found; fix the address, clear the cell and run it again.
  • Keep the Purpose column filled in: a mileage log for taxes needs the business reason for each trip.

Questions

What does this script do?

It is a free Google Apps Script that fills in the driving distance for each trip from the From and To addresses using Google Maps, doubles it for round trips, and totals your miles by month.

How do I set it up?

In 5 steps: 1. Make a Trips tab; 2. Add your rate; 3. Paste the script; 4. Fill in the miles; 5. See monthly totals. The full steps are on this page.

Is it free, and does it send my data anywhere?

It is free: enter your email on this page and we email you the script (Code.gs). It runs in your own Google account; nothing is sent to us.

Can you install it for me?

Yes. We set it up in your Google account in a short Connect session, connect it to your sheet and check that it runs.

Want this connected to the rest of your tools? Send us a short brief.

Pushbuild · Automate your business with Pushbuild: pushbuild.com/contact