⏱️

Online Stopwatch

Precise stopwatch with lap times — millisecond accuracy

00:00:00.000
Space Start/Stop   L Lap   R Reset
📚
Learn more — how it works, FAQ & guide
Click to expand

Free Online Stopwatch with Lap Times and Millisecond Accuracy

This online stopwatch provides precise time measurement with millisecond resolution, lap time recording, and data export. Built with requestAnimationFrame for smooth updates and absolute timestamps for accuracy even when the browser tab is in the background. Lap times are displayed in a sortable table with the fastest and slowest laps highlighted. Your stopwatch state persists across page refreshes. Keyboard shortcuts (Space, L, R) enable hands-free operation. Export lap data as CSV for analysis in spreadsheet applications. No sign-up, no installation, works on any device.

How the Stopwatch Works

Unlike simple interval-based timers that count up using setInterval (which can drift significantly over time), this stopwatch calculates elapsed time by comparing the current timestamp against the start timestamp using Date.now(). This approach guarantees accuracy regardless of browser tab switching, CPU load, or other factors that cause interval drift. The display updates using requestAnimationFrame, which synchronizes with the monitor's refresh rate for the smoothest possible visual update.

The time format HH:MM:SS.mmm provides up to 1-millisecond resolution. Hours are included for extended timing sessions. The monospace font ensures digits do not shift horizontally as values change, preventing visual jitter that is common with proportional fonts.

Understanding Lap Times

Each lap records two values: the lap time (time elapsed since the previous lap or start) and the total time (cumulative time from the initial start). This dual-value system matches professional sports timing conventions. In athletics, the lap time shows how fast each segment was completed, while the total time shows overall progress.

When two or more laps are recorded, the fastest individual lap time is highlighted in green and the slowest in red. This instant visual feedback helps identify performance variations across segments — useful for interval training, lap swimming, running, cycling, or any activity where consistency matters.

State Persistence

The stopwatch saves its state to localStorage every second while running, including the start timestamp, accumulated time, running status, and all lap data. If you accidentally close the browser, refresh the page, or navigate away, the stopwatch resumes exactly where it left off. This feature is particularly valuable for long timing sessions (timing a cooking process, a presentation, or a sports event) where data loss would be problematic. Use the Reset button to explicitly clear all persisted state.

Common Use Cases

  • Sports and fitness: Time laps for running, swimming, or cycling. Record split times for interval training. Compare lap consistency across workouts.
  • Cooking: Time boiling, marinating, resting, and other cooking steps with precision. The persistence feature ensures the timer survives accidental tab closes.
  • Presentations and speeches: Practice timing for presentations to stay within allocated time slots. Record section durations to identify parts that need editing.
  • Scientific experiments: Time reactions, observations, or process steps. Export lap data to CSV for integration with experiment logs.
  • Gaming: Time speedrun attempts with lap splits for different game sections. Track personal bests across sessions.
  • Productivity: Measure how long tasks actually take versus estimates. Use lap times to break down a project into timed segments.

Keyboard Shortcuts for Hands-Free Operation

The stopwatch supports three keyboard shortcuts that work globally on the page: Space toggles between start and stop, L records a lap while the stopwatch is running, and R resets the stopwatch while it is stopped. These shortcuts enable hands-free operation — useful when your hands are occupied (cooking, exercising) or when you need to record laps without looking away from the activity you are timing.

CSV Export for Analysis

The Export CSV button downloads all lap data as a comma-separated values file. Each row contains the lap number, formatted lap time, and formatted total time. CSV files open directly in Microsoft Excel, Google Sheets, Apple Numbers, and LibreOffice Calc. This enables further analysis: calculating averages, creating charts, comparing across sessions, or integrating timing data into reports. The export feature is especially useful for coaches, researchers, and anyone who needs to analyze timing data systematically.

How to Use the Online Stopwatch

  1. 1

    Start the stopwatch

    Click Start or press the Space bar to begin timing. The display updates every millisecond for precise measurement.

  2. 2

    Record lap times

    Click Lap or press L while the stopwatch is running to record a split. Each lap shows the lap number, individual lap time, and cumulative total time. The fastest lap is highlighted in green and the slowest in red.

  3. 3

    Stop and review

    Click Stop or press Space to pause the timer. Review your lap times in the table. Click Reset or press R to clear everything and start fresh.

  4. 4

    Export your data

    Click Export CSV to download all lap times as a spreadsheet-compatible file. Your stopwatch state persists across page refreshes.

Frequently Asked Questions

How accurate is this online stopwatch?
This stopwatch uses requestAnimationFrame with high-resolution timestamps, providing sub-millisecond accuracy. The display updates at your monitor's refresh rate (typically 60 FPS = every 16.7ms). While not as precise as a hardware chronograph, it exceeds the accuracy needed for virtually all non-competitive timing needs.
Does the stopwatch keep running if I switch tabs?
Yes. The stopwatch tracks time using absolute timestamps (Date.now()), not interval counting. If you switch tabs, the browser may throttle the animation, but when you return, the displayed time will be correct because it calculates elapsed time from the start timestamp.
What happens if I refresh the page while the stopwatch is running?
The stopwatch persists its state to localStorage. If you refresh or accidentally close the tab, the timer resumes from where it was. The start time, running state, and all lap times are saved. Use Reset to clear this persisted state.
What keyboard shortcuts are available?
Three shortcuts are available: Space toggles start/stop, L records a lap (while running), and R resets the stopwatch (while stopped). These work regardless of which element has focus, so you can use the stopwatch hands-free.
How is the fastest and slowest lap determined?
When you have two or more laps, the stopwatch compares all individual lap times (not cumulative times). The lap with the shortest duration is highlighted in green, and the longest duration in red. This mimics the lap tracking behavior of professional sports stopwatches.
Can I export lap times?
Yes, click Export CSV to download a comma-separated values file containing all lap data (lap number, lap time, total time). CSV files open in Excel, Google Sheets, Numbers, and any spreadsheet application for further analysis.

You might also like

🔒
100% Privacy. This tool runs entirely in your browser. Your data is never uploaded to any server.