How to use the word error rate (wer) calculator
- Paste the reference text into the first box. This is what was actually said or written.
- Paste the recognized text into the second box. This is what the speech system or the typist produced.
- Choose whether capital letters and punctuation count as differences. Both are ignored by default, which is how most speech scoring is done.
- Read the word error rate and the counts of substitutions, deletions and insertions, then check the alignment table to see where each error sits.
Formula
WER = (S + D + I) / N
S = substituted words, D = deleted words, I = inserted words
N = number of words in the reference
S + D + I = word-level edit distance
The distance is the smallest number of word changes that turns one text into the other. The rate can go above 100% when the recognized text has many more words than the reference.
The quick brown fox
The reference is "the quick brown fox jumps over the lazy dog", nine words. The recognized text is "the quick brown fox jumped over a lazy dog". Two words differ: jumps became jumped, and the became a.
That is 2 substitutions, 0 deletions and 0 insertions, so the word error rate is 2 / 9 = 22.22%. Seven of the nine reference words are correct.
How the alignment is chosen
Several different sets of edits can give the same total. For example, one wrong word can be shown as a substitution or as a deletion plus an insertion, and the second costs more, so the tool prefers the substitution. When two alignments cost the same, this page prefers a match or substitution first, then a deletion, then an insertion. The total number of errors and the rate never depend on that choice, but the split between substitutions, deletions and insertions can differ from another tool.
Using the number well
A word error rate is a blunt measure. It treats every word the same, so missing the or a counts as much as getting a name wrong, and a small rate can still hide an error that changes the meaning. It also depends on how the text is prepared. Spelling variants, numbers written as digits or as words, hyphenation and contractions can all count as errors unless both texts follow one style.
When you compare systems, score them on the same reference, with the same options, and use enough words that one difference does not swing the result. A rate from 20 words is a rough guide. A rate from a few thousand words is much steadier.
Assumptions and limits
- Words are separated by spaces. Text that does not use spaces between words needs to be split first.
- With the options on, capital letters are ignored and punctuation is removed except apostrophes inside words.
- Each box accepts up to 3,000 words so the alignment stays quick in your browser.
- Nothing is uploaded. Both texts stay in your browser.
Frequently asked questions
Can the word error rate be above 100%?
Yes. If the recognized text adds many words that are not in the reference, the insertions can push the errors above the number of reference words.
Why are my substitution counts different from another tool?
Different alignments can have the same total. The total errors and the rate are the same, but this tool picks one alignment by a fixed rule, so the split can differ.
Should I ignore punctuation and capitals?
For speech recognition usually yes, because speakers do not say punctuation. For a typed text check you may want both on, so turn the options off to count them.
Is a lower rate always better?
A lower rate means fewer word differences from the reference. Which errors remain matters too, so look at the alignment before you decide.