Google Maps ETA Prediction

Google Maps ETA Prediction

How traffic, road conditions and years of historical data combine into a single number: the minute you will arrive.

Live + HistoricData Blend
Sub-secondRoute Compute
ContinuousRe-estimation
Graph + MLCore Approach
← Back to Case Studies

Overview

You type a destination and, before you have put the phone down, a number appears: 34 minutes. That number is a prediction about the future of a city — thousands of vehicles, hundreds of traffic signals and a road network you will only partly use.

The hard part is not measuring distance. Distance is trivial. The hard part is that the same stretch of road takes four minutes at 11am and nineteen minutes at 6pm, and the system has to know which of those you are about to experience.

So an ETA is really two predictions stitched together: how long each individual piece of road will take, and which pieces of road you will actually drive on.

Think of it like this: it is less like measuring a piece of string and more like forecasting weather along a specific path — using what is happening right now, plus what usually happens at this hour on this day.

The Core Challenge

An ETA has to satisfy several demands that pull against each other:

Accuracy

Being ten minutes wrong on a thirty-minute trip destroys trust in the whole product.

Speed

The route and its estimate must be computed in well under a second, before the user notices any wait.

Coverage

It has to work on a motorway with rich data and on a village road with almost none.

Freshness

An accident two minutes ago should already be reflected in the number you are shown.

Stability

An estimate that jumps around every few seconds feels broken, even when each individual value is defensible.

High-Level Architecture

The system is a pipeline: the map is stored as a graph, live and historical speed data continuously annotate that graph, and a routing engine searches it to produce both a path and a time.

01

Road Graph

The map is stored as a graph: intersections are nodes, and the stretches of road between them are edges carrying attributes like length, speed limit and road class.

In shortThe map is turned into a giant join-the-dots network, where each line between dots is one piece of road.

02

Live Probe Data

Anonymised, aggregated location signals from phones and vehicles currently in traffic reveal how fast each road segment is actually moving right now.

In shortEveryone already driving is unknowingly acting as a traffic sensor for everyone about to drive.

03

Historical Speed Profiles

For every segment, the system stores typical speeds by time of day and day of week, built from years of observations.

In shortIt remembers that this road is always slow at 9am on a Tuesday, even before today's traffic shows up.

04

Travel-Time Model

A learned model predicts how long a specific segment will take, combining live speed, historical profile, road class, weather and the time you will actually arrive at that segment.

In shortFor each piece of road it asks: given everything we know, how long will this bit take you?

05

Routing Engine

Searches the weighted graph for the best path, where edge weights are predicted travel times rather than raw distances.

In shortIt finds the quickest way through, not the shortest way through, and those are often different.

06

Continuous Re-estimation

As you drive, your own position updates the remaining route and the estimate is recomputed against the latest conditions.

In shortThe number keeps quietly correcting itself as reality unfolds.

From Tap to ETA, Step by Step

1

Snap to Road

Your raw GPS coordinate is matched to the nearest plausible road segment, since satellite positions are rarely exactly on the tarmac.

In shortIt works out which road you are actually on, not just roughly where you are.

2

Candidate Routes

The routing engine generates several plausible paths to the destination rather than committing to one immediately.

In shortIt sketches a few different ways of getting there before picking.

3

Segment-Level Prediction

Each segment on each candidate route is given a predicted traversal time from the model, using live and historical inputs.

In shortEvery individual piece of road gets its own little time estimate.

4

Time-Shifted Lookahead

For segments far along the route, the system predicts conditions at the time you will reach them, not conditions now.

In shortIt guesses what that junction will be like in twenty minutes, because that is when you will get there.

5

Summation and Adjustment

Segment times are summed, then adjusted for turns, signals, junction delays and historical bias corrections.

In shortIt adds it all up, then adds a bit more for turning, waiting and real-world friction.

6

Continuous Correction

Once you are moving, your actual progress is compared against the prediction and the remaining estimate is revised.

In shortIt keeps score of how it is doing and quietly nudges the number as you go.

The Road as a Graph

Before any prediction is possible, the physical world has to become a data structure the machine can search efficiently.

Nodes and Edges

Intersections become nodes; the road between two intersections becomes a directed edge, with separate edges for each direction of travel.

In shortJunctions are dots, roads are arrows between them, and one-way streets only get an arrow one way.

Edge Weights

The weight of an edge is not its length but its predicted travel time, which is why the chosen route is sometimes longer in kilometres.

In shortRoads are measured in minutes, not metres, which is why the long way round sometimes wins.

Turn and Junction Costs

Crossing oncoming traffic, waiting at a signal or making a difficult turn carry their own costs, modelled separately from the roads themselves.

In shortTurning right across traffic genuinely costs time, and the model knows it.

Precomputed Shortcuts

Techniques such as contraction hierarchies precompute long-distance shortcuts so cross-country routes do not require searching every small road.

In shortMotorway-scale routes are worked out in advance, so it never has to consider every side street.

Predicting Travel Time

The obvious method is distance divided by speed limit. It is fast, easy and wrong in exactly the situations that matter most:

Naive Approach
  • Distance divided by the posted speed limit
  • Static — the same answer at 3am and 6pm
  • Ignores signals, turns and junction delay
  • No notion of what conditions will be when you arrive
  • Fails hardest during rush hour, when accuracy matters most
VS
Production Approach
  • Per-segment travel times learned from observed data
  • Blends live probe speeds with historical profiles
  • Models turn costs, signals and junction friction explicitly
  • Predicts conditions at your arrival time, not departure time
  • Continuously corrected against your actual progress

In short: the system does not calculate how long the road is. It predicts how long each piece of it will take you, at the moment you will be on it, and adds those predictions up.

Why the ETA Changes Mid-Trip

A shifting ETA looks like the system being unsure. It is usually the system being honest as new information arrives.

Conditions Genuinely Changed

An incident, a signal failure or a sudden surge in volume on a segment ahead updates that segment's live speed, and therefore your remaining estimate.

In shortSomething happened up ahead after you set off, and the number reflects it.

Prediction Horizon Shortens

Predicting a segment thirty minutes out is inherently less certain than predicting it two minutes out; as you approach, the guess is replaced by near-observation.

In shortThe closer you get, the less it has to guess, so the number gets sharper.

You Deviated

Missing a turn or choosing a different lane triggers a re-route, which is a fresh set of segments and therefore a fresh estimate.

In shortYou went a different way, so it started the sum again.

Bias Correction

If you are consistently travelling faster or slower than predicted, the system can apply a correction to the remainder of the trip.

In shortIf you are running ahead of its guess, it assumes you will keep doing so.

Scalability & Reliability

Serving billions of routing requests over a planet-sized graph requires the work to be spread out and heavily precomputed:

  • Regional sharding — the global graph is partitioned geographically, so a query about one city never touches data for another.
  • Aggressive precomputation — long-distance shortcuts and hierarchical structures are computed offline, turning an expensive search into a cheap lookup.
  • Tiered caching — popular routes and common origin-destination pairs are cached, since a large share of queries repeat.
  • Graceful degradation — where live data is sparse or missing, the system falls back to historical profiles and then to speed limits, so an answer is always available.
  • Aggregation before use — probe data is aggregated across many vehicles before it influences anything, both for privacy and to avoid one unusual driver skewing a segment.

Typical Tech Stack

LayerCommon Choices
Map Data StorePartitioned road-graph storage with versioned map releases
Probe IngestionHigh-throughput streaming pipelines (Kafka-class) for anonymised location signals
Traffic AggregationStream processing to roll raw probes into per-segment live speeds
Historical StoreTime-series speed profiles keyed by segment, hour and day of week
Prediction ModelLearned travel-time models, increasingly graph neural networks over road networks
Routing EngineContraction hierarchies or similar precomputed shortest-path structures
Serving LayerIn-memory caches for hot routes and frequently requested corridors

Trade-offs & Lessons

  • Accuracy versus stability — the most accurate ETA would update constantly, but a number that flickers erodes confidence faster than being slightly wrong.
  • Being consistently slightly wrong beats being occasionally very wrong — users forgive a steady two-minute error far more readily than a single fifteen-minute surprise.
  • Sparse data is the real edge case — the motorway is easy; the rural road with three probes an hour is where the fallback strategy earns its keep.
  • The prediction shapes the traffic — routing enough drivers around a jam creates a new jam elsewhere, so the system is predicting a world it is also influencing.

ETA prediction looks like arithmetic and is actually forecasting. It is a strong template for any system that must commit to a confident number about the future while continuously revising it as reality arrives — which is most operational promises a business makes to a customer.

Jargon, Decoded

A quick, no-nonsense translation of the technical terms used above.

Road Segment

One stretch of road between two junctions, treated as a single unit for measurement and prediction.

Edge Weight

The cost of travelling along a segment. Here it is predicted minutes, not distance.

Snap-to-Road

Matching an imprecise GPS coordinate to the road you are most likely actually on.

Probe Data

Anonymised, aggregated location signals from devices already in traffic, used as live speed sensors.

Historical Profile

The typical speed of a segment at a given hour and day, learned from long-run observation.

Contraction Hierarchies

A precomputation technique that adds long-distance shortcuts to the graph so routing does not need to examine every small road.

Prediction Horizon

How far into the future a prediction reaches. Longer horizons are inherently less certain.

Time-Shifted Lookahead

Predicting conditions on a segment for the moment you will reach it, rather than for right now.

← Back to all Case Studies

Contact Us




Send us a message