OCR Accuracy: How to Measure and Judge It

By FileConvertLab

Published: | Updated:

Measuring OCR accuracy: reference text compared with OCR output, character and word error rates
Comparing a reference text with OCR output to count character and word errors

How accurate is OCR? There's no single answer — it depends on the page far more than on the tool. The honest way to know is to measure it on your own document: count the wrong characters (character error rate, CER) and the wrong words (word error rate, WER) on one sample page. It takes about ten minutes, and it tells you more than any "99% accurate" badge. Here's how to do it and how to read the result.

What "OCR Accuracy" Actually Measures

Accuracy can be counted at three levels, and a claim means little until you know which one:

  • Character level — how many letters, digits and punctuation marks are right. The most flattering number, because one wrong letter in a long word counts as one small error
  • Word level — how many whole words are right. A word with a single wrong letter counts as wrong, so this number is always lower
  • Field or line level — is the invoice total right, is the line there at all? What matters if you're extracting data

A tool saying "99% accurate" nearly always means character level, on clean printed test pages. Your faded fax isn't that test page.

Character Error Rate (CER) in Plain Words

CER is the share of characters the OCR got wrong, compared with a correct reference text. Three kinds of mistake count:

  • Substitutions — a wrong character in place of the right one ("Clased" for "Closed")
  • Deletions — characters, words or whole lines that are missing
  • Insertions — extra characters that aren't on the page (a stray "l" from a speck of dust)

CER = (substitutions + deletions + insertions) ÷ number of characters in the reference.

A worked example: your reference paragraph has 100 words and 550 characters. The OCR output has 5 wrong characters, spread over 4 words.

  • CER = 5 ÷ 550 ≈ 0.9% — or "99.1% character accuracy"
  • WER = 4 ÷ 100 = 4% — or "96% word accuracy"

Same page, same output — and the two numbers tell very different stories.

Word Error Rate (WER) and Why It's Higher

WER works the same way, but counts words: (substituted + deleted + inserted words) ÷ words in the reference. Because an English word averages about five letters, every character error tends to spoil a whole word. That's why a 1% CER already means roughly one wrong word in every twenty.

WER is the more useful number for editing. It answers the question you actually have: how many words will I need to fix?

What a "99% Accurate" Claim Means on a Real Page

Take the claim at face value and do the arithmetic. A dense A4 page holds around 3,000 characters. At 99% character accuracy, that's about 30 wrong characters per page — enough to make every other line need a fix. At 99.9% it's three.

So when you see an accuracy figure, ask three questions:

  1. Characters or words?
  2. Measured on what pages? Clean laser prints, or scans like yours?
  3. Do missing lines count? Some measurements only score the text that was output

The only figures we quote for our own OCR are what we measured: on 10 pages of real scanned Russian documents, the character error rate was 5.6% for a contract and 7.6% for a bank statement with tables. Even those say little about your pages — which is why you check.

Missing Lines Count Too — Check Them First

The easiest error to miss is text that simply isn't there. Our OCR leaves out lines it can't read with confidence rather than filling them with nonsense. That's the right trade-off for a searchable archive, but it fools a quick check: the lines you do get can be perfect while a line is gone.

Reading the output alone, a page with one line missing can look flawless. Counting lines against the page catches it immediately.

So step one of any check is: count the lines or paragraphs in the output and compare with the page. Only then look at the words.

How to Spot-Check OCR Accuracy in 10 Minutes

  1. Pick the hardest page — smallest print, palest ink, a table or a stamp. If that page is fine, the rest will be
  2. Type a reference of about 100 words from that page, exactly as printed, into Word. Save it as DOCX
  3. Run the page through OCR — for example OCR PDF to Word — with the document language set
  4. Compare the two in compare documents, which runs in your browser: it highlights every word that differs and counts added, deleted and unchanged words. A misread word shows up as one deleted plus one added, so the larger of the two counts is a quick estimate of wrong words
  5. Divide wrong words by 100 — that's your WER for the page. For CER, count the wrong characters in the highlighted words and divide by the characters in your reference (Word's Review → Word Count shows them)

If you work with many pages, the free Python library jiwer computes both in two lines: jiwer.wer(reference, output) and jiwer.cer(reference, output).

A Real Example: Counting Errors Line by Line

Here's one line from a test with a sample of neat cursive handwriting from Wikimedia Commons, run through our OCR:

Text
ReferenceBrightly shone the moon that night,
OCR outputBrightly shome the moom that night

Counted: 2 substituted words out of 6 ("shome", "moom"), each off by one letter, plus 1 deleted character (the comma). Readable, but not publishable without a fix — which is exactly what the counts tell you. Printed text on a clean page usually comes out with no errors on a line like this; handwriting is a different story, covered in handwritten text recognition.

How Accurate Does OCR Need to Be?

The level you need depends on what you'll do with the text:

UseWhat to checkWhat's acceptable
Searchable archiveKey names and terms findableOccasional wrong letters; a missing line matters more
Editing a documentWER on a sample pageA few fixes per page is still faster than retyping
Quoting or publishingEvery wordProofread the whole text against the scan
Numbers, totals, IDsEvery digitNothing less than all of them — check each one

For searching, a searchable PDF tolerates errors well: one misread letter in a long document rarely hides the page you're looking for. For figures, no accuracy rate is good enough — a single wrong digit in a bank account number is a failure. Whether it's worth OCR at all or quicker to type is weighed up in OCR vs manual transcription.

The OCR Errors to Look For

When you proofread, these are the usual suspects:

  • Look-alike characters: 0 and O, 1, l and I, 5 and S, 8 and B, "rn" read as "m"
  • Accents and special letters: ß read as B, é as e — set the document language to the document's own language and run the page again
  • Punctuation: dropped commas, colons in times ("2:00" → "200"), decimal points in prices
  • Reading order: two-column pages can come out interleaved, line by line across both columns
  • Missing lines: especially on very faint or low-resolution pages

What Changes OCR Accuracy

The page decides most of it. In rough order of how much damage we've seen in our own tests:

  • Handwriting vs print — the biggest gap by far
  • Wrong document language — a page read with a language of another script comes out garbled; leave the menu on Automatic or choose the page's own language
  • Faint text after black-and-white conversion — can erase a page entirely
  • Small, blurred or decorative type — more substitutions

How the page goes from pixels to text, and why these factors matter, is explained in how online OCR works. For the steps of running a scanned PDF through OCR, see how to extract text from a scanned PDF.

Summary

OCR accuracy isn't a property of a tool; it's a property of a page run through a tool. Measure it the way professionals do: count missing lines first, then compute WER on a 100-word sample of your hardest page, and treat every number and name as unverified until you've checked it. Ten minutes with OCR PDF to Word and a side-by-side comparison tells you whether the output is ready to use.

Related Tools

Frequently Asked Questions

How accurate is OCR?

It depends on the page more than on the tool. Clean printed text on a straight, sharp scan comes out with few or no errors; photos, faint copies, small or decorative type and handwriting produce many more. The only reliable figure is one you measure on a sample of your own documents.

What is character error rate in OCR?

Character error rate, or CER, is the number of wrong, missing and extra characters divided by the number of characters in a correct reference text. Five mistakes in a 550-character paragraph is a CER of about 0.9 percent, which is the same as 99.1 percent character accuracy.

What is the difference between CER and WER?

CER counts characters, WER counts whole words. A word with one wrong letter counts as a whole wrong word, so WER is always higher than CER for the same output. WER is the better guide to how much editing you'll have to do.

What does 99 percent OCR accuracy mean?

Usually 99 percent of characters correct, measured on clean test pages. On a dense page of about 3,000 characters that still means around 30 wrong characters. Ask whether a figure counts characters or words, what pages it was measured on and whether missing lines are included.

How do I check the accuracy of OCR output?

Type about 100 words from your hardest page as a reference, run that page through OCR, and compare the two texts word by word, for example with a document comparison tool. Count missing lines first, then wrong words. Wrong words divided by 100 gives you the word error rate.

Can OCR be 100 percent accurate?

On a short, clean printed page it often is. Across long or imperfect documents, expect some errors, so treat every number, name and date as unverified until you've compared it with the original.

Do missing lines count in OCR accuracy?

They should, as deletions, but a quick read of the output won't show them: OCR leaves out lines it can't read with confidence rather than writing nonsense. Always compare the number of lines or paragraphs in the output with the page before checking individual words.

Does choosing the document language affect OCR accuracy?

It can. Automatic picks the recognition model from the script on each page, including Cyrillic, Arabic and Chinese, and when it picks the right language the result is the same as choosing it by hand. Setting the language yourself, when you know it, can't do worse than Automatic, and it's the way to get Traditional Chinese right.