Stopwatch Timer

The stopwatch supports lap timing; the countdown rings and reminds you when time is up. Handy for workouts, eggs and pomodoro focus.

Stopwatch
00:00.00
    Countdown
    min sec
    05:00
    Tip: an alarm rings and a reminder pops up when time is up.

    Timing in a browser is harder than it looks

    A naive timer counts with setInterval and adds one tick per callback. That drifts, because the callback is queued and never fires at exactly the requested interval — under load the error accumulates, and after ten minutes a stopwatch built this way can be visibly wrong.

    The reliable approach is to record the timestamp at which timing started, then on every animation frame compute now minus start and display that. Because each reading is derived from the clock rather than accumulated from previous readings, error cannot build up.

    Which clock to read

    SourceBehaviour
    Date.now()Wall-clock time. Can jump forwards or backwards if the system time is adjusted or a network sync occurs.
    performance.now()Monotonic and high-resolution. Cannot go backwards, and is not affected by clock changes — the correct choice for durations.

    Lap versus split

    Background tabs slow down

    Browsers throttle timers and animation frames in inactive tabs to save power, sometimes to once per second or less. A counter that increments per frame will therefore under-count while the tab is hidden. Timestamp-based timing is immune to this, since the clock keeps running even when the display does not update — which is a further reason to prefer it.

    Accuracy limits

    Browser timers are deliberately coarsened for security, so sub-millisecond precision is not attainable. For ordinary work — cooking, workouts, presentations — this is irrelevant. For benchmarking code, run many iterations and compare distributions rather than trusting a single reading.

    The hand on the button is the real limit

    Displaying hundredths of a second invites more trust than manual timing can support. Reaction to a visual cue averages around 200–250 ms; to a sound it is closer to 150–180 ms. Both the start and the stop press carry that delay, so a hand-timed interval carries several tenths of a second of uncertainty before any measurement is taken.

    Worse, the error is systematic rather than random: people press consistently late, so repeating the measurement tightens the spread but does not remove the offset. Anything that must be compared against a standard — a race, a reaction test, an experiment — needs a photogate, an audio trigger or a software timestamp, not a human thumb.

    Precision is not accuracy

    A readout of 12.34 s means the display resolves hundredths, not that the interval was 12.34 seconds. That distinction decides which number is worth quoting:

    TaskUseful resolutionWhy
    Cooking, steeping, bakingSecondsIngredients and heat transfer vary far more than a second
    Workout intervals0.1 sEffort varies by more than the timer does
    Presentation timingSecondsRehearsal pace is never repeatable to the tenth
    Reaction testsMillisecondsOnly meaningful if input and display latency are known
    Code benchmarkingMicroseconds, repeatedA single run is dominated by noise and JIT warm-up

    Quoting more digits than the method supports is the most common error in timed work — a result written as 12.34 seconds when the realistic uncertainty is half a second misleads anyone who later compares it.

    Related tools

    Unix timestamp Date calculator Time zone converter

    FAQ

    Will I be alerted when the countdown ends?
    Yes. When the countdown reaches zero the page plays a chime and shows a reminder.
    Can the stopwatch record laps?
    Yes. The stopwatch supports lap timing — each lap shows its split and the cumulative time.
    Is my data uploaded?
    No. Everything runs locally in your browser; nothing is sent anywhere.