Under the hood

How a browser measures your speed with GPS.

Updated 2026-05-04 · 8 min read

Open a webpage, tap a button, and an accurate live speedometer appears on your screen. No app, no install, no special hardware beyond the phone in your pocket. The pieces that make this work have been quietly assembled over the past 50 years. Here is how they fit together.

Where the speed comes from

Your phone is in constant conversation with a small fleet of satellites circling the Earth at roughly 20,200 km of altitude. The Global Positioning System (GPS) maintained by the United States Space Force has 24 to 32 satellites active at any given time, arranged in six orbital planes so that at least four are visible from almost any open spot on the planet at all times. Modern phones also listen to GLONASS (Russia), Galileo (Europe), BeiDou (China), and QZSS (Japan), giving them a much larger constellation to triangulate against.

Each satellite continuously broadcasts a tiny signal: its identity, its precise position, and the exact time the signal left, accurate to nanoseconds because each satellite carries an atomic clock. Your phone listens for those signals and measures how long each one took to arrive. Light travels at a known speed, so the time of flight gives the distance to that satellite. With distances to four satellites, your phone can solve four equations for four unknowns: latitude, longitude, altitude, and clock offset. The result is your position, usually within a few meters when the sky is clear.

From position to speed

A speedometer needs speed, not coordinates. There are two ways to get speed from GPS, and modern receivers use both at once.

The simple way is to record two positions a second or so apart, measure the distance between them with the haversine formula (the proper formula for distances on a sphere), and divide by the time gap. Distance over time is speed. This works, but it is noisy. A small jitter in either position reading shows up as a big jump in the calculated speed.

The better way is the Doppler shift. As you move toward or away from each satellite, the frequency of its signal arrives at your phone slightly compressed or stretched. The exact amount of shift, when measured against the satellite's known orbital velocity, tells your phone the radial component of your motion relative to that satellite. With shifts from four or more satellites, your phone solves for your three-dimensional velocity vector directly. This Doppler-derived speed is significantly more accurate than position-difference speed, often within 0.1 m/s (about 0.2 mph).

Your phone reports whichever value is more reliable for the current conditions. A modern iPhone or Android, when the sky is open, gives you a speed reading that is accurate to roughly half a mile per hour or better.

Where the browser fits in

For decades, accessing GPS from a webpage was impossible. The browser had no way to ask the operating system for your location, and even if it could have, websites had no protocol for using it safely. In 2008, the W3C standardized the Geolocation API and every major browser implemented it within a year. Today it is one of the most widely supported web APIs.

The API is simple. A webpage calls navigator.geolocation.watchPosition() with a callback. The browser asks the user for permission. If granted, the browser starts handing the page a stream of position objects: latitude, longitude, accuracy in meters, altitude, heading, and crucially, speed in meters per second. The browser does the GPS work itself, calling into the operating system, which talks to the GPS chip. The page just receives the numbers.

That speed value is what powers GPS Speedometer. We do not calculate speed from positions ourselves; we take the value the browser hands us, smooth out any frame-to-frame jitter with a standard exponential moving average, and draw it on the dial 60 times per second.

What "accuracy" actually means

Each position reading comes with an accuracy radius in meters. This is the half-width of a circle within which your true position has a 68 percent probability of falling. An accuracy of 5 meters means your true position is almost certainly within 5 meters of the reading. An accuracy of 50 meters means your position is roughly known but not pinpoint.

GPS Speedometer treats anything below 25 meters as "GPS Ready" and switches the status indicator to green. Above 25 meters, it shows "Acquiring" — the position is too rough to trust the speed calculation. In practice, you reach GPS Ready within 5 to 30 seconds of stepping outdoors with a clear view of the sky, often much faster if your phone has been used recently and still has a warm fix.

What can go wrong

GPS is a line-of-sight technology. Anything between you and the sky degrades it. The classic problem cases:

  • Indoors. Walls and ceilings absorb GPS signals. You can sometimes get a fix near a window, but it is rough and slow.
  • Urban canyons. Tall buildings reflect signals off their walls before they reach your phone. The reflected signals took longer to arrive, so your phone calculates a longer distance, and your reported position drifts away from where you actually are.
  • Tunnels and parking garages. No sky, no GPS. The reading freezes at the last known position until you exit.
  • Heavy tree cover. Reduces the number of satellites your phone can hear. With fewer satellites, the accuracy circle grows.
  • Bad weather. Rain and snow have a small effect; thunderstorms can cause occasional dropouts but rarely stop GPS entirely.

Battery

Continuous high-accuracy GPS tracking with the screen on uses roughly 5 to 12 percent of battery per hour on a modern phone. The GPS chip itself is not the largest drain; the screen and the radio are. GPS Speedometer pauses the GPS request when the browser tab is hidden, which keeps the cost down for short sessions. For longer recording (full bike rides, road trips), the iOS companion app is built for background use and is far gentler on the battery, since it can suspend the screen and use Apple's motion-coprocessor to filter low-quality readings.

Privacy

Every GPS reading on this site is processed on your device and discarded. Nothing is uploaded to a server, stored on disk, or sent to any third party. The browser permission you grant is per-origin, meaning it applies only to gpsspeedometer.io and not to any other site. You can revoke it at any time from your browser's site settings.

The site does record basic page-level analytics (page views, theme preference, App Store clicks) through Google Analytics 4, but no GPS coordinate or speed value is included in any analytics event. This is verifiable in your browser's developer tools.

Why GPS speed and your car speedometer disagree

You will often see GPS speed read 2 to 5 mph lower than your car's analog dial at highway speeds. This is intentional on the car's part. Manufacturers calibrate factory speedometers to read slightly high to give themselves legal margin: an over-reading speedometer is allowed in most jurisdictions, an under-reading one is not. GPS, calibrated against actual satellite physics, is the more honest reading.

That said, your car's speedometer is the legally relevant one. GPS speed is great for verifying calibration, racing telemetry, or curiosity, but in a roadside dispute the police officer is looking at a radar reading and your dashboard, not your phone screen.

Where to go from here

The full speedometer is on the homepage. If you want trip recording, ghost-pace racing, HUD mode, and offline use, the free iOS app covers all of that. The FAQ section answers more specific questions about accuracy, battery, and offline behavior.

← Back to the speedometer