Score guide
CPM vs WPM for code
What the numbers measure, how they are calculated, and which comparison is actually useful.
Published 25 September 2026 · Codestroke
Codestroke shows characters per minute (CPM), words per minute (WPM), and accuracy. For code, CPM is the most direct speed measure because a semicolon and a letter each take a keystroke, while “words” are only a standardized conversion.
How Codestroke calculates speed
CPM = correct characters ÷ elapsed minutes
WPM = correct characters ÷ 5 ÷ elapsed minutes
For example, 250 correct characters in one minute gives 250 CPM and 50 WPM. That does not mean the snippet contained 50 ordinary words. The five-character “word” is a unit used to make typing speed comparable.
Codestroke also calculates raw CPM from counted characters before correctness is applied. The displayed CPM uses correct characters, so it is the better number to pair with accuracy when reviewing a run.
Accuracy tells a different story
Codestroke's final accuracy measures correct keystrokes as a share of total keystrokes during the session. Correcting a mistake can improve the final text, but it does not erase the original wrong keypress from the accuracy measure.
Some whitespace is handled automatically in Codestroke's current practice mode. If you compare results with another typing tool, check how that tool counts spaces and indentation before treating the two CPM scores as equivalent.
What makes a fair comparison?
Hold the language and test duration constant. Compare several runs rather than choosing only the fastest one, since snippet difficulty changes. For your own progress, a short note about accuracy and the symbols that caused errors is often more useful than a single rank.
The Codestroke leaderboard shows eligible Top 20 scores. Those are high-performing results, not the average typing speed of all developers. Our benchmark guide explains that distinction.
Measure your code typing speed