Earthquake Science Early Warning

Seconds Before the Shaking: How GeoShake's Countdown Works

10 min read By GeoShake Team

Tap a GeoShake network alert and you may meet a screen few apps have: a large number, counting down. 14. 13. 12. Those are seconds — our estimate of how long until the earthquake's shaking reaches the ground you're standing on.

In the first post of this series, we walked through the three streams behind every alert we send. This one is about what happens after you tap the fastest of them. Where that number comes from, the arithmetic your phone does to produce it, why we refuse to show it below five seconds — and why your distance from the epicenter, not our software, decides how many seconds you get.

One thing to clear up before the physics: nothing here is prediction. By the time a countdown exists, the earthquake has already happened. The only open question is a race — whether news of the shaking can outrun the shaking itself.


The physics that makes warning possible

An earthquake releases several kinds of seismic waves at once. Two of them matter for warning:

  • P waves are the sprinters — roughly 6 km/s through the crust. They arrive first and, for most people, gently: a thud, a rattle, the dog lifting its head. To a seismometer, though, they are unmistakable.
  • S waves follow at roughly 3.5 km/s. They are the ones that do the damage — the strong side-to-side shaking that cracks walls and empties shelves.

So the damaging wave moves at barely half the speed of the detectable one. And both are slow compared to information: a data packet crosses a country in the time an S wave crosses a neighborhood. The moment seismometers near the epicenter recognize the shaking, word of the earthquake can leap ahead of the earthquake itself.

That gap — fast weak wave first, slow damaging wave second, information faster than both — is the warning. There is nothing else to it. Every earthquake early-warning system on the planet is built on this single fact; our early warning guide covers the wave physics in more depth.

And 6 and 3.5 aren't blog numbers rounded for effect. They are the constants in our shipped code: the live map draws its expanding P- and S-wave rings at exactly these speeds, and the countdown on your phone divides by exactly 3.5.


The countdown math

Here is the entire calculation, in plain English:

Seconds of warning ≈ your distance to the epicenter ÷ 3.5, minus the seconds already elapsed since the earthquake began.

That's it. Distance divided by S-wave speed tells you when the strong shaking arrives; subtract the time already spent detecting the quake and delivering the alert, and whatever remains is yours.

A worked example. Say the epicenter is 100 km away and the alert reaches your phone 10 seconds after the quake began. The S wave needs 100 ÷ 3.5 ≈ 28.6 seconds to cover that distance. Ten of those are already spent — so the screen opens with roughly 18 seconds on it. Enough to drop, cover, and hold on. Enough to step away from the window. Not enough to do everything; enough to do the right thing.

Where does this run? On your phone. The alert carries two facts about the event — its origin time and its epicenter. Your phone knows the third fact, your location, and does the subtraction locally. It doesn't run the countdown as a cosmetic animation either: on every tick, the remaining seconds are re-derived from the origin time, so the number on screen is always the physics, never a stale copy. The number you see is your phone doing arithmetic, not a server doing theater.

One small detail that previews the rest of this post: the seconds are always rounded down. An estimate of 18.7 shows as 18. A countdown is allowed to under-promise; it is not allowed to over-promise.


Why we don't show a countdown under 5 seconds

A countdown is a promise with a deadline. Show a "4" and you are promising four usable seconds — but by the time the screen renders, your eyes focus, and your brain parses the number, that promise has already expired. A timer that small isn't information anymore; it's theater.

So we gate it. Below five estimated seconds, the screen doesn't show a number at all. It says "Shaking expected now" — the truthful version of the same message. If the estimated arrival is already behind us, it switches again, to "may have passed." At no point will you see a countdown we don't believe.

The gate has a quieter sibling, too: if the inputs stop making sense — a broken timestamp, an impossible distance — the screen refuses to count and falls back to the safest mode instead of inventing a timer. Bad data produces a humble screen, never a confident one.

If this instinct feels familiar, it's the same one behind the ~M label on our preliminary magnitudes: a number is shown only when we can stand behind it. That tilde has a story of its own, and it gets its own post.


Why your distance decides everything

Now the candid part. Look at the formula again: distance ÷ 3.5, minus elapsed time. If you are close to the epicenter, the first term is tiny — and no engineering on earth can rescue it. The S wave may need only a few seconds to reach you, less time than detection and delivery can possibly take. Your screen will say "Shaking expected now," and it will be right.

This is not a product failure, and we'd rather tell you here than have you discover it mid-earthquake: near the epicenter, warning time is approximately zero — for every early-warning system on earth. National systems with thousands of stations, ShakeAlert-scale deployments, community networks like ours: all of them share this blind spot, because it isn't an engineering limit. It's a physics one. The area closest to the rupture always gets the news and the shaking at nearly the same moment.

Here's what one and the same alert — arriving 10 seconds after the quake begins — buys at different distances:

Your distance S-wave travel time What the screen shows
20 km ~6 s "May have passed" — the wave beat the alert
35 km ~10 s "Shaking expected now" — a dead heat
50 km ~14 s "Shaking expected now" — ~4 s left, below the 5-second gate
100 km ~29 s Live countdown from ~18
200 km ~57 s Live countdown from ~47

Notice the 50 km row: a few real seconds remain, and the honesty gate still swallows them, because four seconds is not a promise we can keep. And notice the far rows: distance buys time, but it usually buys weaker shaking too. The countdown earns its keep in the middle band — far enough that the math leaves something, close enough that the shaking still matters. In that band, tens of seconds are exactly what Drop, Cover, Hold On was designed for.


Station density = seconds

Of the three quantities in the formula, two are locked. Your distance is your distance, and the wave speed belongs to the planet. The only term anyone can improve is the third: the seconds already elapsed when the alert reaches you. Most of that term is detection time — and detection time is a function of station density.

A network event is only declared when multiple stations confirm the same shaking (the no-single-sensor rule from part one applies here in full). The closer stations sit to the epicenter, the sooner the waves reach enough of them, the sooner the event is confirmed — and the smaller the elapsed term becomes, which hands extra seconds to every person in the widening circle around the quake.

That's the quietly beautiful economics of a community network: a sensor near a quake's epicenter can't buy its own household much warning for that quake — the host sits in the zero-warning zone — but it buys a great deal for everyone tens of kilometers out. Density anywhere is seconds everywhere. It's also why the countdown becomes most useful precisely where stations cluster: in one of the densest clusters now taking shape in our network, local stations do the detecting while the whole surrounding region collects the seconds.

If you want to be part of that arithmetic, hosting a sensor is how. Every station added near where earthquakes start grows the warning time for everyone around it — including people who will never know your sensor exists.


What the screen shows

Everything above compresses into one screen with three modes:

  • Live countdown — when at least five estimated seconds remain: a large number ticking down, re-computed on every tick, with Drop, Cover, Hold On guidance right beneath it.
  • "Shaking expected now" — when fewer than five seconds remain: a pulsing warning in place of a timer that couldn't keep its word.
  • "May have passed" — when the estimated arrival is behind us: the screen says so, along with how long ago that was. Once the wave is comfortably past, the urgency stands down and the same screen reads as a calm event summary.

And there is a fourth situation that is less a mode than a refusal: if the app doesn't have your location, there is no countdown at all. No distance means no arithmetic, and no arithmetic means no number — the screen shows the event's details and skips the timer entirely. No assumed city, no invented distance, no theatrical ticking.

Whatever the mode, the event card underneath carries the same measured quantities as the notification that brought you there — how many stations confirmed the event, and an intensity class derived from measured ground acceleration (PGA) — along with the safety guidance, which stays on screen in every mode.


That's the whole story of the countdown: two wave speeds, one subtraction, a five-second honesty gate, and a network whose density decides how much the subtraction leaves over. It is an estimate, always — physics doesn't sign guarantees, and neither do we. Still ahead in this series: the full story of the ~M tilde, and a map of exactly which setting controls which alert.


Frequently asked questions

How much earthquake warning can you get?

There is no single answer — the estimate is your distance to the epicenter divided by the S-wave speed of about 3.5 km/s, minus the time detection and delivery already took. Very close to the epicenter that leaves roughly nothing; at 100 km, with an alert arriving 10 seconds after the quake begins, about 18 seconds; farther out, more. Every figure is an estimate, never a guarantee — that's true of every early-warning system on earth.

Why does my alert say 'shaking expected now' instead of a countdown?

Because the S wave is estimated to arrive at your location in under five seconds. A countdown that small can't keep its promise — by the time you read it, it's already wrong — so the screen shows a plain warning instead of a number. If the estimated arrival is already past, it says the shaking may have passed rather than showing a fake timer.

Does my phone calculate the countdown itself?

Yes. The alert carries the event's origin time and epicenter; your phone combines them with your location and computes distance ÷ 3.5 km/s minus elapsed time, locally, re-deriving the number every tick. If the app doesn't have a location for you, it shows the event's details without a countdown instead of guessing.

Want the countdown on your phone?

The free GeoShake app computes it locally from the physics in this post — no timer you can't trust.

Download the App

Share this article:

Get earthquake insights in your inbox

One short email a month — new guides, network updates, real detection stories. No spam, unsubscribe anytime.