TRAVELTIME Formula – Google Sheets

TRAVELTIME helps spreadsheet users plan trips by finding the time needed to travel between two points. You can calculate the time for hundreds of address pairs in seconds.

❗This custom formula is only available to users of the Travel Formulas add-on in the Google Workspace Marketplace. Travel Formulas uses Google Maps for you while you stay in Sheets.

❗This function outputs text. Use the VALUE function to convert it to a number.

💵 Upgrade to the pay-per-use TRAVELTIME_API formula for unlimited daily searches and access to the “avoid” feature to drive around tolls, highways, ferries and indoors.

The TRAVELTIME function help drop down

Purpose

The TRAVELTIME function returns the trip duration between locations.

All Travel Formulas

TRAVELTIME – Returns the trip duration between locations

TRAVELDISTANCE – Finds the trip distance between locations

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

TRAVELDIRECTIONS – Provides turn-by-turn directions

💡 Need Travel Time Calculations in Your Spreadsheet?

Travel Formulas gives you TRAVELTIME plus three other powerful functions—no API keys, no complexity. Calculate travel times, distances, and get turn-by-turn directions for hundreds of location pairs.

Perfect for: Commute planning, delivery scheduling, territory analysis, fleet management, real estate research

Get Travel Formulas | Learn more about features

Syntax

=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. It is best to use a cell reference formatted to a datetime [optional, defaults to present time]

Examples

Example 1 – Two Addresses

Let’s keep it simple at first and use two cities: one for the origin and the other for the destination.

The TRAVELTIME formula using two cities
Two Addresses

These locations are just a bit oversimplified. But if Google Maps accepts them, the formulas work. It turns out the trip from New York to Los Angeles is way too long at 40 hours and 49 minutes.

This function accepts direct input such as “NY” but can also use cell references. We’ll switch to using cell references for the following examples. Using cell references gives us more flexibility.

Example 2 – Different Modes

We can evaluate not only driving but also mass transit, biking, and walking.

TRAVELTIME calculations with different transit modes of car, transit, biking, and walking
Different Modes of Travel

You could enjoy an Amtrak ride for 64 hours and 44 minutes, bike for 267 hours, or walk for 1,011 hours. Let’s bring these two addresses closer and look at different departure times.

Example 3 – Different Departure Times

Let’s say you’re planning a trip from Chicago to Detroit and want to know the best time to leave. You can use the TRAVELTIME formula and feed it different departure times.

Four TRAVELTIME formulas with different departure times
Different Departure Times

You can save 11 minutes of travel time by leaving at 8 AM instead of 4 PM.

Example 4 – Different Location Formats

You don’t have to use a city name or full address. Other geolocation methods, such as Plus codes and coordinates, also work, as shown below.

The TRAVELTIME formula accepting different geolocation formats
Different Location Formats

Rows 2 through 6 in the image above use the same location but different methods to specify it. You can use a city name, a full address, a placename, Plus code, or even latitude and longitude.

Frequently Asked Questions

How does TRAVELTIME account for traffic?

When you include a departure_time parameter, TRAVELTIME uses Google Maps traffic predictions to estimate travel duration. This means you’ll get realistic drive times that factor in rush hour congestion, construction patterns, and other traffic conditions — just like you’d see when planning a trip in Google Maps.

What format does TRAVELTIME output?

TRAVELTIME returns a text string like “4 hours 23 mins.” If you need to perform calculations with the result (such as adding travel times together), wrap it in the VALUE function to convert it to a numeric duration.

Does TRAVELTIME work with international locations?

Yes! TRAVELTIME works anywhere Google Maps has coverage. You can calculate travel times between cities in different countries, across continents, or within the same neighborhood. The function handles different address formats, languages, and location types automatically.

What’s the difference between TRAVELTIME and TRAVELTIME_API?

TRAVELTIME is included with Travel Formulas and works great for most users. TRAVELTIME_API is a pay-per-use upgrade that removes daily search limits and adds the “avoid” parameter, letting you route around tolls, highways, ferries, and indoor paths.

Can I use TRAVELTIME for bulk route planning?

Absolutely. TRAVELTIME is built for bulk calculations — drag the formula down to calculate travel times for hundreds of address pairs at once. Combine it with TRAVELDISTANCE to get both time and mileage for every route in your spreadsheet.

When should I use TripTally instead of TRAVELTIME?

Use TRAVELTIME when your data is already in Google Sheets and you want formula-based calculations. Use TripTally when you need a simpler interface, want to quickly calculate a few travel times without building formulas, or prefer a graphical user interface. Both use the same accurate Google Maps data.

Conclusion

The TRAVELTIME formula is a versatile tool that helps you plan your trips without leaving Google Sheets. Whether you’re comparing departure times for a daily commute or building a travel schedule for hundreds of stops, it handles the heavy lifting while you stay focused on your data.

TRAVELTIME is one of four powerful functions included with Travel Formulas. Pair it with TRAVELDISTANCE to get both duration and mileage, or use TRAVELROUTEURL to generate clickable Google Maps links for every route.

Get Travel Formulas from the Google Workspace Marketplace →