How typing speed and accuracy are calculated
Every typing test shows a WPM number, but not every test counts the same way. Here is exactly how CodeTypingTest measures speed and accuracy, with worked examples you can check by hand.
What counts as a word
Real words vary in length, so "words per minute" doesn't count real words. The convention almost every typing test follows is that a word is five characters, including spaces and punctuation. Typing print("Hello, World!") is 22 characters, or 4.4 words, even though it holds only three real words.
Gross WPM: raw speed
Gross WPM is everything you typed, divided by five, divided by the time in minutes:
gross WPM = (characters typed ÷ 5) ÷ minutes
In the words test, every character you enter counts, including ones you later delete, along with each space that moves you on to the next word. Backspace and keys such as Shift don't count.
Example: in a 60-second test you enter 250 characters. That's 250 ÷ 5 = 50 words in one minute, so your gross speed is 50 WPM.
Net WPM: speed after errors
Raw speed on its own rewards hammering the keys. Net WPM, the main score in the words test, takes off one word per minute for every error you left uncorrected:
net WPM = gross WPM − (uncorrected errors ÷ minutes)
An uncorrected error is a wrong or extra character in a word you've moved past, or a character you skipped by pressing space too early. If you notice a mistake and fix it with Backspace, it no longer counts against your net speed.
Example: the same 50 WPM minute with 4 errors left in gives 50 − 4 = 46 net WPM. Net WPM never goes below zero.
Accuracy: how often you hit the right key
accuracy = correct keystrokes ÷ all keystrokes × 100
Accuracy looks at every attempt, not at the finished text. A mistake you corrected still counts as a miss, because you still pressed the wrong key. That's why you can end with perfect text and still see 96% accuracy.
Example: 250 keystrokes, 10 of them wrong (even if you fixed every one): 240 ÷ 250 × 100 = 96%.
Peak speed, consistency and streak
- Peak WPM is your best net speed over any 5-second stretch of the test. It's always at least as high as your final net WPM, and shows what you can manage in a burst.
- Consistency measures how steady your pace was, from your raw speed in each second:
100 × (1 − standard deviation ÷ average), kept between 0 and 100. A steady typist scores close to 100; someone who sprints and pauses scores lower. - Streak is the longest run of words in a row that you typed exactly right.
How code mode is timed
Typing code is a different task, so code mode measures it differently:
- Time runs from your first key until every character of the program is correct. The first key starts the clock even if it's wrong.
- Mistakes show in red. You can type past a wrong key, but the program only finishes once every character is right, so you go back with Backspace and fix it, as in an editor. Every program you finish is therefore typed exactly right, so there's no net speed to work out: mistakes cost you time instead.
- Indentation is filled in for you after each line break, and it isn't counted as typed. Speed is the characters you actually typed, divided by five, per minute.
- Accuracy is correct keystrokes divided by all keystrokes, and every wrong key counts, even once you've fixed it.
Your best time is saved for each language and program, so you can see whether you're getting faster at, say, FizzBuzz in Rust.
Why the timer starts on your first key
Starting the clock when the page loads would punish you for reading the program or putting your hands in position. Starting on the first key measures typing, not reaction time. Speed is also always worked out over at least one second, so a single quick keystroke at the very start can't produce a silly number.
What's a good typing speed?
There's no official standard. As a rough guide, many people type everyday text at around 35 to 45 WPM, and 70 WPM or more is generally thought of as fast. Code is slower for everyone: symbols, capital letters and line breaks all take extra effort. So don't compare your code speed with your prose speed. Compare it with your own earlier times on the same program instead.