Search code examples
typing

How "WPM" calculate in typing speed apps?


I'm working on typing speed app and I need to know what's the Formula of calculating WPM (Words Per Minute)

Edit: indeed i know:

wpm = correct_characters_in_60_seconds / 5

but i have no idea what should i do with decimal numbers like 22.6 or 19.7 and...

for example if user typed 158 keystrokes in 60 seconds so, 158/5 = 31.6 so do the result should be 32 WPM or 31 WPM? How? thanks.


Solution

  • WPM (Word per minute)

    For the purpose of typing measurement, each word is standardized to be five characters or keystrokes long, including spaces and punctuation. For example, the phrase "I run" counts as one word, but "rhinoceros" and "let's talk" both count as two.

    So the formula is:

    Number_of_keystroke / time_in_minute * percentages_of_accurate_word
    

    or

    Number_of_keystroke / time_in_second * 60 * percentages_of_accurate_word
    

    When dealing with decimals you should round down when the decimal is >.5 , else round down

    Example:

    5.5 -> 6

    7.3 -> 7

    3.49 -> 3

    4.51 -> 5