CPM vs WPM for code

CPM expresses typing speed in characters per minute. WPM expresses speed using a standard five-character word—not a count of ordinary words in your code. Read either speed measure alongside accuracy.

By Codestroke · Score guide
In this guide, you’ll learn

Speed units → Accuracy → Fair comparisons

01 How CPM and WPM are calculated

Codestroke calculates speed from correct characters and elapsed time. WPM uses five characters as one standard word; it does not count the words in a snippet. Displayed values are rounded to whole numbers.

FORMULAS · CODESTROKE PRACTICE
CPM
correct characters ÷ elapsed minutes
WPM
correct characters ÷ 5 ÷ elapsed minutes

Raw CPM uses counted characters before correctness is applied. Counting depends on the input mode, including how whitespace is handled.

WORKED EXAMPLE · NOT YOUR RESULT

250 correct characters in 60 seconds

CPM250250 ÷ 1 minute
WPM50250 ÷ 5

50 WPM is a standardized conversion—not 50 ordinary words.

Using this convention, what is 300 CPM in WPM?

Choose an answer to check your understanding.

300 CPM ÷ 5 = 60 WPM using the five-character convention. Different tools may calculate or display scores differently.

02 Accuracy tells a different story

A speed figure does not describe mistakes on its own. Read accuracy beside CPM so that a fast but error-heavy run does not automatically look like an improvement.

03 Make a fair comparison

Keep the language and test duration the same, then compare several sessions rather than only the fastest one. Snippet difficulty can vary, so note the symbols or transitions that caused mistakes.

  1. 01
    Same language

    Python and SQL can contain different syntax patterns.

  2. 02
    Same duration

    A short sprint and a longer test are different conditions.

  3. 03
    Accuracy + speed

    Review both measures across multiple comparable runs.

Tools can differ in how they count characters, spaces, indentation, and errors. Check each tool’s method before comparing scores across products.

Leaderboard scores are high-performing results, not an average typing speed for all developers.

Measure your code typing speed

Choose a language and duration you can repeat.

Start typing test

04 Keep learning