Our book review site needed a feature readers would actually use, and that other sites would want to link to. We settled on a reading speed test, then found that most existing tests share a flaw: skim the passage, press stop, and you're suddenly reading at 1,000 words per minute.
Here's how we built one that pushes back, in a single React client component inside a Next.js app.
The flow
The component is a small state machine with four stages: intro → reading → quiz → result.
const [stage, setStage] = useState<"intro" | "reading" | "quiz" | "result">("intro"); We wrote three original passages (about 300 words each), each with three multiple-choice questions. Original text matters: nobody has read it before, and there's no copyright question.
Timing with performance.now()
Date.now() can jump if the system clock changes, so we time with performance.now(). The visible timer updates four times a second, but the score uses the exact start and end values:
function finishReading() { const s = (performance.now() - startedAt) / 1000; if (s < 5) return; // nobody reads 300 words in under 5 seconds setSeconds(s); setStage("quiz"); } const wpm = Math.round(words / (seconds / 60)); The "I'm done" button stays disabled for the first 5 seconds, so a reflex click can't produce a score.
Guarding against skimming
Two checks keep the result honest.
Comprehension questions. After reading, the passage disappears and three questions appear. The result shows the score, and if you got fewer than two right, we suggest retaking at a slower pace.
A credibility cap. Anything above 900 wpm is labelled "Too fast to measure" and isn't saved:
const MAX_CREDIBLE_WPM = 900; if (score <= MAX_CREDIBLE_WPM) { try { localStorage.setItem(STORAGE_KEY, String(score)); } catch { // storage may be blocked } } Why 900? A 2016 review of speed-reading research (Rayner and colleagues, Psychological Science in the Public Interest) found that comprehension drops sharply when people push far past normal reading speeds, so 900 is a generous ceiling. The baseline we compare against is Brysbaert's 2019 meta-analysis of 190 studies, which puts adult silent reading at about 238 wpm for non-fiction and 260 wpm for fiction.
Note the try/catch around localStorage: in some private browsing modes it throws, and the tool should still work there.
The book-time calculator
A speed on its own is a curiosity. "This book will take you 9 hours" is useful. The Open Library search API is free, needs no key and allows cross-origin requests from the browser, so we query it directly with a timeout:
const ctrl = new AbortController(); const t = setTimeout(() => ctrl.abort(), 12000); const res = await fetch( `https://openlibrary.org/search.json?q=${encodeURIComponent(q)}` + `&fields=key,title,author_name,number_of_pages_median&limit=6`, { signal: ctrl.signal } ); clearTimeout(t); Asking only for the fields we need keeps the response small. number_of_pages_median gives a sensible page count across editions. If the search fails, the user can still type a page count.
The maths is simple:
const totalWords = pages * wordsPerPage; // 275 by default const minutes = totalWords / speed; const days = Math.ceil(minutes / minutesPerDay); What we'd do next
- More passages, so repeat visitors get a fresh one
- Separate averages for reading on a phone and on a desktop
You can try it here: Reading Speed Test
If you've built anything similar, I'd like to hear how you handled the skim problem.