Online Stopwatch

Elapsed time is taken from the system clock at the moment a button is pressed, not accumulated by a counting loop — so a background tab, a stalled frame or a busy page costs you nothing, and the number you read when you come back is right.

Online Stopwatch With Lap Times — Millisecond Precision, Nothing to InstallBuildFigure

How accurate this actually is

The display repaints on the browser's animation frame, roughly sixty times a second, but the elapsed value is never accumulated from those frames. Every reading is Date.now() at the moment of the press minus the stored start timestamp, which means a dropped frame, a garbage collection pause or a backgrounded tab throttling timers to once a second changes what you see but not what is measured. Come back to the tab after ten minutes and the number is correct to the millisecond.

What is not accurate to the millisecond is you. Human reaction time on a visual cue runs around 200 to 250 milliseconds, and the variation between presses is larger than the third decimal place. The millisecond display is worth using when you are transcribing a stopped time precisely; it is not worth reading as a claim about the event you timed. Electronic timing in sport exists because a person with a stopwatch cannot do better than about a tenth of a second.

Splits and totals

Each lap records two numbers. The split is the time since the previous lap, or since the start for the first one. The total is the time from the start to that lap. For interval training the split is your set; for a distance run it is your mile; for a relay it is the leg. Once there are two laps the fastest split is marked green and the slowest red, which makes a fading pace obvious without reading every number.

A detail worth knowing: pressing Lap does not stop the clock, and pressing Stop does not record a lap. If you want the final segment in the table, press Lap immediately before Stop, otherwise the last stretch exists only as the difference between the total elapsed time and the last recorded total.

Precision, and switching it mid-run

Hundredths is the convention in sport and is easier to read at a glance because only two digits are moving. Milliseconds shows three digits cycling too fast to follow live but is useful when you are writing results down after stopping. Internally everything is stored in milliseconds regardless, so switching the setting changes the display only — no recorded lap loses precision.

Pressing the setup button again while a run is in progress keeps the accumulated time and the recorded laps but leaves the stopwatch paused. That is deliberate: the alternative is a control that silently keeps running while you change its configuration.

Long durations

The minute field is not capped at 60. A two-hour run reads 125:30.00 rather than rolling over to an hours column, which keeps the number monotonic and easy to sort if you are copying results into a spreadsheet. There is no upper limit in the code, but there is a practical one in the browser: a tab that stays open for many hours can be discarded to reclaim memory, and if that happens the timer is gone. For anything spanning hours, write down the wall-clock start time as a backup.

Questions people ask

Can I close the tab and come back to it?

No. The state lives in the page and is not written to storage of any kind, so a reload, a navigation or a closed tab wipes it. This is a deliberate trade — nothing to store means nothing to leak — but it does mean an accidental refresh loses your laps. Switching to another tab is fine; the clock keeps correct time while backgrounded.

Are there keyboard shortcuts?

Tab to the buttons and press space or enter. There are no single-key bindings because the page has form fields above the stopwatch and a bare space or L key would fight with them. If you need one-key operation for repeated timing, focus the Lap button once and space will hit it every time.

Why does the display sometimes stutter?

The repaint runs on requestAnimationFrame, which the browser deprioritizes when the tab is not visible or the machine is busy. The digits can visibly skip. The underlying measurement is unaffected, and the value snaps back to the correct one on the next frame it does render.

Does it work offline?

Once the page has loaded, yes — all of the logic is in the page and there are no network calls while it runs. It is not installable as an offline app, so you do need connectivity to load it the first time.

Related