How does Google Maps calculate time in travel on a bicycle?

When Google Maps estimates how long it will take me to get some place, it’s pretty accurate-- it’s correct within about a minute for trips under 20 minutes, and within about 3 minutes for trips about 20 - 90 minutes.

It is way off for bicycle trips, though.

I have a question about this. I also am including a lot of information about road and trails in my town, and how fast my particular bike goes. If it’s TL;DR, skip down to the

BUT

Google Maps takes me preferentially on trails, and Indy has a lot, where the only motorized vehicles permitted are electric (ie, no exhaust), and they have a speed limit of 15mph. These trails are for regular bikes, scooters, electric bikes and scooters, but not dirt bikes nor mopeds that use gas, and pedestrians, whether running, jogging, walking at any speed, pushing strollers, etc. dogs on leash are permitted, but I’m pretty sure horses are not. We don’t have mounted police.

If a trail isn’t available, it looks for a street with a bike lane, and Indy has a lot of those too. They have solid red lines that cars are not supposed to cross, and bikes are not supposed to cross except to get into the left turn lane, and you have to signal. Some bike lanes have their own lights. Bike lanes are taken very seriously, I’ve seen cars ticketed for violating them. I imagine bike riders are sometimes ticketed too.

There’s no posted speed for bike riders, but the posted speed for cars can be anything from 25mph to 45mph. Bikes are not supposed to be on streets with limits great than 45mph, unless it’s a rural residential area with a speed of 50mph.

My electric bike has a top motor speed of 21mph. I have pedaled it up go 22mph on a straightaway, and 24mph downhill. I don’t do this often, and a typical speed for me in bike lanes on streets is 19mph, but it takes me longer to get to that speed-- if there are frequent stops, I may not get over 17mph.

I keep to 15mph on the trails unless it is very early in the morning, and no on else it there. I may go up to 17mph in those cases.

When I rode a regular bike (solely powered by leg muscles), my top speed uphill was about 3-8mph (depending on the hill), 20-30mph downhill (again, depending on the hill), and 18mph on a long straightaway, but only about 14mph on city streets with frequent stops. For comparison, bikes in the Little 500 go 20-25mph on the straight segments of the track. I could make speeds like that, just not maintain them very long. I was rarely in a hurry, though, and kinda moseyed along one my bike.

Anyway, my electric bike compares pretty well to what a young, in shape, but not in a terrible hurry, regular rider can do.

I’m going into such detail, so you can see I’m going at or close to, top speeds either possible, or permitted on the road.

BUT

(here is the question): Why is Google WAY off in telling me how long bike rides are going to be?

It says it will take me 1hr 27min to get to work, It takes about 2hrs 20min-- almost an hour more, and that is using the exact route GPS give, and the time it is queried, an without stops. It continues to adjust itself, adding minutes as I go, but it just adds a minutes every two or three-- there are no places it makes sudden jumps.

On short trips, it is way off the other way. It says it will take me 25 minutes to get to the pharmacy, and it takes 12-- albeit, I use a different route, but the route I take is a legitimate bike route, and I’m not cutting through parking lots or anything. There a little strip of stores very close to my apartment with a dollar store I go to when I need one thing, like Tylenol, or milk. GPS says it will take 10 minutes (I could walk in that). It actually takes about 3 to bike there. In that case, I take the route GPS gives me.

How does Google estimate biking times? does it not know the trails have a speed limit, and think I’m going 18-21mph through them, when I’m really going 15mph? Does it do “worst case scenario” on the short rides, and assume I stop and wait at every light? One of the reasons I don’t use the route to the pharmacy it provides it the number of stops. Also, I take a long stretch of sidewalk where bikes are permitted.

When sidewalks are wider than either 2 yards or 2 meters (some are one way and some are the other) human-powered and electric bikes and scooters are permitted. I have wondered whether the GPS knows that, of if it can even see and perceive the width of sidewalks.

Sorry, got to rambling a bit, but this is the rant in my head on every bike trip.

On the one hand, people bike at a wide range of different speeds, and even if Google measures your own average bike speed (I don’t know if it does), it’d take a while for it to learn that.

On the other hand, I bike (all pedals, no e) at around 15 MPH, and Google is usually pretty good at predicting my bike times, so if my speed just happens to be the default typical bike speed that it uses, you should be beating its estimates on your 19 MPH e-bike, not exceeding them. So I dunno.

How far is your work? 35 miles? In which case it estimates an average of ~23 mph vs. your actual ~15 mph?

Not sure what’s going on with you. A little Google shows that Google Maps uses 10 mph as the default cycling speed, regardless of route. Testing this out on Google Maps routing several trips (some all street, some a combo of streets and trails) of varying distances, and they come out between 12.22 to 11.15 Mph.

Right. And the distances on Google maps are not real world measurements by a surveyor - the map is created digitally and is not totally accurate. This means the longer the bike route, the more variable the result from real world experience, even if they are using a flat average speed for calculating total time. Also, if unpaved trails are included in the route it may use a slower average speed - I doubt Google maps has captured posted speed limits for bike trails.

There was a typo in my previous post - I meant to say between 10.22 to 11.15 MPH.

Perhaps it uses a virtual Freddy Mercury and watches him ride his bicycle?

(Ducking for cover)…

This is anecdotally based on my own riding and mapping routes on Google: it seems like Google starts with an assumed pedaling speed of ~12 mph on flat ground without stops. For typical city routes with traffic lights and stop signs, their estimated time is more like 10-11 mph, which matches what you saw. It also makes adjustments for hills routes.

I find the estimates are pretty close for me when riding more casually in the city. They overestimate my time when I’m pedaling harder for exercise.

It isn’t just using a fixed speed, it takes slope into account. Checking now a route I have ridden many times (4.6 miles one way) it has it 26 minutes for uphill (315 ft elevation gain) or 20 minutes downhill. This isn’t far from my one hour round trip on that route, spending a little time at the destination.

Are the trails used by snow mobiles in the winter such that the average is corrupted?

Otherwise, maybe the database has a bad entry for those trails. When Google calculates the time, it uses the wrong average bike speed.

Agree w the others. I see Google Maps using ~11mph for all my routes. With a bit of slowdown on the routes with lots of traffic lights. We’re absolutely flat here, so no slope corrections needed. All my routes are fully on city streets, no dedicated non-road bike trails.


It’d be interesting for @RivkahChaya to compute the average speed Google uses on her main routes. Likewise to compare the distance Google says the route is versus what distance her bike’s odometer says she covered when she actually rides it.

My own guess is they’ve got some bad data for some of the non-roads along her route. If there is a way to restrict Google to car roads only there in Indy, how does that estimate compare to reality?

This is such a massive disparity that either Google has bad data as LSLGuy suggest or you’re riding a different route. Given your average speed is faster than Google’s assumption, you should be riding the route faster than the estimate, not an hour slower.

What is the distance Google reports for your route to work? How does that compare to reality?

If you’re using Google Maps to navigate your route†, it’s collecting data about that route and sending it back to Google - so if a load of people drive the same stretch of road as me, all using Google Maps to navigate, and they all slow down for some reason on a particular stretch of road, at a particular time of day, Google will infer a slower typical speed for this stretch of road at that time of day.
Those collected typical speeds are used to calculate the estimate of your journey time - and it does this for each different mode of transport. If it’s way less accurate for cycling, that might either mean there is just less data from which to make good assumptions, or maybe the data contains a lot more variability for bikes than it does for cars.

†(In some cases, Google might be collecting this data even if you’re not using Google Maps - just if you have your phone in your pocket)

Indeed. Back in the day, I used to frequently bike to the Science Center downtown, because I had a part-time job there. I knew the route from home, including some odd little zigzags downtown where I’d found things like “given the usual traffic, it’s easier to turn left here instead of there”. Well, one time, instead of going there from home, I was going there directly from the local high school, where I’d been subbing that day, and I thought that might make it quicker to cross a different bridge into downtown, so I looked up the biking directions. Nope, same bridge, which meant that I still knew basically how to get there, but then I noticed that the directions had exactly the same odd little zigzags that I used. And then I realized that I was probably about 90% of Google’s entire database of “people biking from the West Side to the Science Center”, so of course it was suggesting the route that I usually take.

I’ve run a few experiments and at least around here, Google nails the distances. After some math, I think they use about 12.5mph as their level ground unobstructed cruise speed then inject standard delays for traffic lights and stop signs along the route. Which has the effect of lowering the average door-to-door speed to something in the 9-11mph range.

I significantly beat its biking times, but I cruise at about 22-23mph on electric throttle and only slow for traffic & turns. My bike’s trip odometer validates Google’s distances. Around here. On streets, not trails.


The only thing I can think that makes sense for @RivkahChaya’s defective case is there’s some significant fraction of her ride that’s on a non-road bike trail that Google somehow thinks is zero miles from end to end. So her actual mileage and Google’s assumed mileage are waaay different.

It’d be interesting for her to try breaking her Google nav into smaller hunks, say first half vs second half, or the on-street segments separately from the trail segments. With some fiddling, she can isolate which part of the ride is computed correctly and which part is not. Once the problem is isolated to a particular small segment, it may be possible to give that problem and the correct data as feedback to Google.


Unrelated to mapping distance I’m having a similar feedback issue w Google where the default photo of a place is a pic from something a couple blocks away. Which error lures any delivery driver whose app uses google to misidentify where to leave things.

Their feedback input system doesn’t really have a box for this case, and there is no generic “Fill out this textbox to explain the issue to a human in prose, and add attachments to illustrate it.” Would that it were so.

I don’t know if it comes strictly from the data from users who stick to bike trails, or if there is some programmed data regarding bike trails, but the route is significantly different from anything I would drive in that it is always on designated bike paths.

I have not compared the information on my odometer to the distance that Maps originally estimated when it gave me the shorter riding time-- it readjusts itself along the route, so the riding time gets more and more accurate, and by the time I have covered about 90% of the route, it is estimating the correct time, or is maybe a minute or two short.

I supposed it’s possible that there could be some clash between the “best” route staying on bike paths (by far safer, and also more pleasant) and the “best” route considering shortness as the primary factor. Designated bike routes is a choice I can select, and not the default, and time is another choice, albeit, I don’t know what the default is if I don’t select either.

“Time” is my choice on auto routes (it used to be “gas efficiency,” before I got my current [electric] car). And that is time, not distance as the crow flies. Maps seems very good at knowing about accidents and other slow-downs, and rerouting me around them as we go when I’m in the car.

I’m guessing that a lot of people choose time over gas efficiency, since a lot of people are using Maps to go to work, and don’t want to encounter construction or an accident.

I suppose at one time when the Maps bike was still kind of under construction, the default might have been “time” as a carryover from autos, even though most people would choose distance or safety (ie, bike routes). So maybe there’s some clash of information. Maybe it’s correctly giving me the bike path route I’m asking for, but the time to ride the shortest, less safe and pleasant route. Or for all I know, time to drive the bike route in a car (not really possible, since a car couldn’t drive on the trails, but you could still calculate the distance times 15mph).

Regarding my biking style on the electric bike (people who don’t care can go onto the next post): I very rarely am cruising on electric throttle, because I would run out of battery power if I did. But my knees are not in great shape, so I’m usually in throttle-assist 2 out of a choice of 0 - 5. I also keep it in first gear out of choices of 1 - 7, and use the higher ones for inclines only. I also bring up throttle-assist on steep hills, but rarely all the way to 5.

There is one long hill on my way back from work with something like a 80 degree incline (I am not making that up) that comes off a curved, level segment of path, so no opportunity to build up speed, and is also pretty long, although it does change to a more manageable maybe 65 degrees about half-way. There must be a big rock they had to build the path over. Anyway, I anticipate it now and shift to 3rd gear as soon as I see the curve, and also throttle level 5 on the curve. I do throttle up the really steep part, then pedal once it becomes more manageable, and lower the throttle to 4.

The only other time I ever use full throttle is to start from a dead stop on an incline, even one that isn’t steep, but that is just for a few meters, then I start pedaling. Or occasionally for a steep hill that takes me by surprise and I don’t have a chance to upshift.

In an assist of 2 in first gear, though, it is easy to keep a speed of 20mph, and sometimes get it to 22 or 23 on an assist of 3, which sometimes I do for long straightaways with no stops; I can get this speed in 1st gear, even though the max speed the bike can go on full throttle without pedaling, is 21mph.

That’s a ladder, not a hill.

In any event, there does come some slope where it’s easier to dismount and walk the bike up. Ironically, one of those is unavoidably right next to the local bike co-op.

But to tie that back to the “best” route, I think that Google’s bike directions do also take slope into account, and will (for instance) favor a bridge over a valley over going down into the valley and back up, even if it’s a little longer.

That’s sorta question 1 to answer and will probably be the smoking gun.

Then comes the more fiddly part of finding out which part of the route contributes the wrong mileage.

The mileage could match while the time does not. I would imagine the database stores mileage and a speed factor (per method of transportation) separately per leg of the path.

So that the calculation is logically like:

time = distance * bike_modality * bike_speed_factor * realtime_traffic_data * personalized_adjustment

where:

bike_modality = 12.5 mph
bike_speed_factor scales based on the type of road, road conditions, etc.

This allows Maps to surface the actual mileage (a human understood metric) while calculating a more accurate estimate using internal heuristics.

In reality, “distance * bike_modality * bike_speed_factor” might all be combined into a single weight for that leg of the path.


I missed that this was in Indiana so it’s not likely a bias from snowmobiles. My thought was that the weights got biased by real-time data from snowmobiles in the winter.

I’ve seen Maps time estimates be way off at the US/Canadian border crossing because there are tons of cars zipping through the automated lane while tons of other cars sit at the manual lanes.

If anyone’s interested in algorithms for calculating the best route, I just watched this video from Veritasium yesterday. I don’t know if it will help with any of the questions in this thread, since they admit that they don’t know exactly what algorithms Google Maps use.