tools / timer
timer/
Countdown timer and stopwatch. Time is measured by timestamps, so it stays accurate in the background; when it ends, the title flashes and an alarm sounds.
Lap
| # | Split | Total |
|---|
What are a countdown timer and a stopwatch
A countdown timer counts down from a set length to 0, and a stopwatch adds up time from 0. This page measures time by subtracting two readings of the monotonic clock performance.now(); the countdown runs up to 99 hours 59 minutes 59 seconds and, when it ends, plays an alert sound and flashes the tab title, while the stopwatch shows hundredths of a second and records laps.
How it works: subtracting readings, so it doesn’t slow down in the background
performance.now() is the monotonic clock defined in the W3C High Resolution Time specification: its readings never decrease, and changing the system time does not make it jump.
- Countdown: at the start it records the end time = current reading + time remaining, and every 200 milliseconds refreshes the display with end time minus the current reading; a one-shot timer set for the end time finishes it.
- Stopwatch: elapsed time = the part accumulated before pausing + current reading − the reading when this run started, redrawn on every screen refresh.
- In a background tab the browser slows timers and redraws, but the number shown is always computed by subtracting readings, so it catches up as soon as you switch back and no error builds up.
Example
With 1500 milliseconds left, the countdown rounds up and shows 2 seconds; after 3723456 milliseconds the stopwatch is past 1 hour, so it adds the hours, and anything below a hundredth of a second is dropped.
- Input
countdown 1500 ms stopwatch 3723456 ms
- Output
countdown 00:00:02 stopwatch 1:02:03.45
Sources
FAQ
Does the countdown slow down in a background tab?
No. The display catches up the moment you switch back and the finish alert still fires on time. While it runs, the tab title shows the time left. If the system suspends the browser (a locked phone, a sleeping computer), the page's scripts may pause and the sound or notification may be late, so don't rely on a web page alone for something that must be on time.
The countdown ended but I heard no sound. What should I check?
First check whether the device or the tab is muted. The alert sound is generated by the browser on the spot (three beeps in a group, three groups), not an audio file, and browsers that don't support it stay silent without showing an error. When time is up the page title flashes; click the page, press any key or switch back to the tab to stop it.
I ticked "Send a browser notification when done" but nothing showed up
First check whether the browser has given this site permission to send notifications: ticking the box the first time asks for it, and if you refuse, the box is unticked again; ticking it later tells you to enable the permission in the browser settings. Even with permission, Do Not Disturb or Focus modes on your system may block it, and some browsers (especially on phones) don't let a web page send notifications this way; then you only get the sound and the flashing title. The notification is sent by the page itself, so closing the tab means no notification.
What's the longest countdown, and what does "Enter a valid time" mean?
The longest is 99 hours 59 minutes 59 seconds. Enter whole numbers: 0–99 for hours and 0–59 for minutes and seconds, no decimals or negatives, and not all zeros ("Duration can't be 0" appears). For 100 minutes, enter 1 hour 40 minutes.
Can I pause the countdown, and how do I change the time after pausing?
Yes. Pausing keeps the remaining time, and "Resume" carries on from there. While it's running or paused, the hour, minute and second fields and the quick buttons are locked; to change the time, press "Reset" first, which returns to the duration in the fields and unlocks them. Switching to "Stopwatch" doesn't interrupt a running countdown.
How precise is the stopwatch, and how do laps work?
It shows hundredths of a second (0.01 s) and adds hours after one hour; the real error also depends on your reaction time when pressing the button. Laps can only be taken while it's running (the button is disabled when paused), and Reset clears them. "Split" is the time since the previous lap, "Total" is the time since the start, and the newest lap is at the top. The "Copy" button at the top right of the lap list gives you tab-separated text (number, split, total) that pastes straight into a spreadsheet.
Is my timing kept if I refresh the page or close the tab?
No. The timer lives only in the current page, so refreshing, closing the tab or a browser crash loses it, and nothing is saved or uploaded. For a long timer, keep this tab open.