Travel Formulas – Time and Distance Formulas in Google Sheets



Travel Formulas Logo
Formula autocomplete showing for four travel formulas
Four Available Formulas

Bring the power of Google Maps into your spreadsheets with the Travel Formulas Google Sheets add-on.

Your tool lets me to wrap up my IRS mileage calculations in a few days rather a couple weeks each year.” – David F.

Fantastic Add on which will save so much time flicking between Maps and Sheets. I love that it is a formula based function so you can incorporate it within other strings.” – Christian F.

Benefits

  • Calculate 1000s of mileage reimbursements in minutes
  • Plan multi-stop delivery routes without tab-switching
  • Auto-calculate travel expenses for your entire team

You get access to four custom formulas to calculate distances, times, and routes efficiently to free up time for more critical tasks. Avoid switching between your spreadsheet and Google Maps.

Custom Formulas

Calculate trip information without leaving your spreadsheet with these four custom formulas.

TRAVELTIME – Returns the trip duration between two locations

TRAVELDISTANCE – Finds the trip distance between two locations

TRAVELROUTEURL – Returns a link to your route in Google Maps™

TRAVELDIRECTIONS – Provides turn-by-turn directions

Use paid formulas to exceed Google’s daily usage quotas or calculate tolls.


TRAVELTIME Formula

Returns the trip duration between two locations.

The TRAVELTIME formula
Calculating Trip Duration

=TRAVELTIME(origin, destination, mode, departure_time)

origin – The starting location

destination – The ending location

mode – The mode of travel (“driving”, “walking”, “bicycling”, “transit”) [optional, defaults to driving]

departure_time – A datetime in the FUTURE for transit/driving in traffic. Best to use a cell reference formatted as a datetime [optional].

avoid – [Available only in the paid TRAVELTIME_API formula.] Features to avoid: 0-None, 1–Tolls, 2–Highways, 3–Ferries, 4–Indoors [optional, defaults to 0]

⏱️ Find the fastest route by trying different departure times.

The TRAVELTIME formula with different departure times
Different Departure Times

TRAVELDISTANCE Formula

Returns the trip distance between two addresses.

The TRAVELDISTANCE formula
Calculating Trip Distance

=TRAVELDISTANCE(origin, destination, mode, unit)

origin – The starting location

destination – The ending location

mode – The mode of travel (“driving”, “walking”, “bicycling”, “transit”) [optional, defaults to driving]

unit – The unit of distance (“mi”, “km”) [optional, defaults to miles]

avoid – [Available only in the paid TRAVELDISTANCE_API formula.] Features to avoid: 0-None, 1–Tolls, 2–Highways, 3–Ferries, 4–Indoors [optional, defaults to 0]

TRAVELROUTEURL Formula

Returns the link to the route in Google Maps™.

The TRAVELROUTEURL formula
Creating a Link to the Route

=TRAVELROUTEURL(origin, destination, mode)

origin – The starting location

destination – The ending location

mode – The mode of travel (“driving”, “walking”, “bicycling”, “transit”) [optional, defaults to driving]

TRAVELDIRECTIONS Formula

Returns turn-by-turn directions.

The TRAVELDIRECTIONS formula
All Directions from one formula

=TRAVELDIRECTIONS(origin, destination, unit, mode, departure_time)

origin – The starting location

destination – The ending location

unit – The unit of distance (“mi”, “km”) [optional, defaults to miles]

mode – The mode of travel (“driving”, “walking”, “bicycling”, “transit”) [optional, defaults to driving]

departure_time – A datetime in the future for transit/driving in traffic. It is best to use a cell reference formatted to a datetime [optional, defaults to present time]



Location Formats

If Google MapsTM can interpret the locations, they will work in this add-on. Accepted location identifiers include:

  • Latitude / Longitude
    • Will snap to the nearest road
  • Street address
  • Plus Code
  • City / Country / Other political boundary
  • Point of interest
  • Airport
  • Park

Graphical User Interface

Check out our other travel add-on, also available on Google Workspace Marketplace, TripTally, for menus and buttons instead of formulas.

Video Tutorials

YouTube player
Install Travel Formulas
YouTube player
Use Travel Formulas

Pricing

Start Your Free 7-Day Trial. After the free trial, Travel Formulas is $4 per month or $57 for a lifetime license. Be sure to use your Google account’s email address.

Multiple User Pricing

We offer the following discounts for multiple users in the same organization. Contact us before you checkout.

QuantityMonthlyLifetime
2 – 10$3$37
11 – 50$2$22
51 – 200$.50$12
201 +$.25$7

FAQ

What are the usage limits?

Travel Formulas operates within Google’s daily quotas on all add-ons and apps. These quotas limit the app to 1,000 or 10,000 direction requests per day (depending on the type of Google account) and an overall daily run time. You can purchase additional daily direction requests if you are a high-volume add-on user which allow you to use the formulas that exceed Google quotas.

The limits are the same in Travel Formulas’ free and paid versions. If you use TripTally, both add-ons count toward the same quota.

You can reduce automatic recalculations by going to the File menu, then Settings, choosing the Calculation tab, and ensuring it is set to “On change.” Also, copy the results of the formulas and paste them as values. This ensures they won’t recalculate.

Does Travel Formulas work with Place Chips?

Yes, any address that Google Maps™ recognizes will work in the add-on. The chip’s formatting does not impact the validity of an address.

How do I convert the time output to a number?

The TRAVELTIME function provides its output as text that looks like a number. If you intend to use the result in other formulas, use the VALUE function to change it to a number first.

How do I prevent the #NAME? Error and “Loading….”?

Cause #1 – Google Sheets does not recognize your custom travel formula. Ensure you have enabled the add-on on every sheet you use. Go to the Extensions menu, choose Travel Formulas, then Enable in workbook.

Cause # 2 – You are using a spreadsheet created with Travel Formulas by another user, but you don’t have the add-on installed.

Solution # 1: Copy and paste the output from your Travel Formulas as values. This will prevent any future recalculation.

Solution # 2: Use TripTally for one-time calculations instead of live formulas.

How do I prevent “please click Enable in Workbook in the menu to confirm you are licensed'”

If you have clicked the menu option to enable the add-on and are still receiving the enable message, create a new Google Sheet and try the add-on inside that new Sheet. Travel Formulas performs best when you are the Owner of the Sheet.

How do I solve the Permission Denied error code?

The error message “We’re sorry, a server error occurred while reading from storage. Error code PERMISSION_DENIED.” occurs when a user is logged into multiple Google accounts. Log out of all other Google accounts, restart your browser, and start the add-on again.



Subscriber Portal | Terms of Service | Privacy Policy | Contact