Technical Methodology

Typing Engine & Measurement Methodology

How CheckTypingSpeeds ensures sub-millisecond precision, clock drift immunity, and mathematically sound touch-typing scoring.

1. Monotonic Timing vs. Interval Tick Drift

Many legacy typing websites measure elapsed time by running a JavaScript setInterval(fn, 1000) and incrementing a seconds counter. However, when browser tabs are backgrounded or when the CPU experiences a brief workload spike, JavaScript timers are throttled by the browser runtime, causing significant drift (often 10–20% error over a 5-minute test).

CheckTypingSpeeds eliminates timer drift by using monotonic hardware timestamps:

elapsedMilliseconds = performance.now() - testStartTime;
elapsedMinutes = elapsedMilliseconds / 60000;

By computing elapsed duration directly against the system's high-resolution monotonic clock on every frame, our timer remains perfectly accurate to the millisecond regardless of tab switching or CPU throttling.

2. The 5-Character Standard Word Rule

In professional touch typing, raw space-delimited word counts can fluctuate wildly depending on vocabulary difficulty. To ensure fair and reproducible measurement:

  • 1 Standard Word = 5 Keystrokes: Every 5 characters typed (including letters, spaces, and punctuation) counts as exactly 1 word.
  • Gross WPM (Words Per Minute): Calculated as (Total Characters Typed / 5) / Elapsed Minutes.
  • Net WPM (Penalized Speed): Calculated as max(0, Gross WPM - (Uncorrected Errors / 5) / Elapsed Minutes).

3. Unicode & Input Method Composition (IME)

To prevent partial keystrokes during complex multi-key compositions (such as accents or Devanagari/Hindi matras) from corrupting your score, our engine hooks into standard DOM composition events:

  • compositionstart: Pauses single-keystroke counting during intermediate character construction.
  • compositionend: Commits only the final normalized Unicode character string to the typing engine.