DocuClipper logo
Back to blog

OCR Accuracy: How to Measure It and How to Improve It

By DocuClipper Editorial Team, Financial document automation specialists
6 min read

How to measure OCR accuracy with character error rate, word error rate, and field-level accuracy, and the preprocessing steps that improve it.

OCR accuracy is how closely the text an OCR engine produces matches the text actually on the page. It is usually measured as character error rate (CER) or word error rate (WER): the number of substitutions, deletions, and insertions needed to turn the OCR output into a hand-verified reference, divided by the length of that reference. Accuracy is 1 minus the error rate. For financial documents, also measure field-level accuracy, because one wrong digit in an amount is a wrong number regardless of how low the CER is.

This guide covers how to measure OCR accuracy, what moves it, and what to do about it. For where OCR breaks down entirely, see OCR limitations.

While you are here

Extract every transaction from any bank PDF

Upload a statement from any bank and DocuClipper returns a clean table with dates, amounts, descriptions, and running balance intact. No reformatting before you can reconcile or import.

How OCR accuracy is measured

Character error rate (CER)

CER = (S + D + I) / N
  • S = substitutions (a character read as a different one, such as 8 read as B)
  • D = deletions (a character that was missed)
  • I = insertions (a character that was added)
  • N = number of characters in the ground truth

S + D + I is the Levenshtein edit distance between the OCR output and the ground truth. Character accuracy is 1 minus CER. Because insertions count, CER can exceed 100 percent on very bad output.

Example: the ground truth line 03/14 ACH DEPOSIT 1,250.00 has 26 characters. The OCR reads 03/14 ACH DEP0SIT 1,250.0: one substitution (O read as 0) and one deletion (the final 0). CER = 2 / 26 = 7.7 percent, so character accuracy is 92.3 percent.

Word error rate (WER)

The same formula at word level: substituted, deleted, and inserted words divided by the number of words in the ground truth. In the example above, two of four words are wrong, so WER is 50 percent. WER is always harsher than CER because a single bad character spoils a whole word.

Field-level accuracy

For documents that feed accounting, what matters is whether each field you use is exactly right:

Field accuracy = correct fields / total fields

Measure it per field type: dates, descriptions, amounts, balances. In the example, the description is wrong (DEP0SIT) and the amount is wrong ($1,250.0 instead of $1,250.00, which may or may not parse correctly). For statement data, amounts and dates are the fields that change the books, so they deserve their own number.

How to calculate OCR accuracy on your own documents

  1. Build a ground truth sample. Choose pages that represent what you actually process: clean digital PDFs, phone photos, faxed or photocopied scans. Transcribe them exactly, or carefully correct OCR output line by line.
  2. Run OCR on the same pages with the engine and settings you are evaluating.
  3. Calculate CER using an edit distance tool. Open-source libraries such as jiwer in Python compute CER and WER directly.
  4. Calculate WER the same way at word level.
  5. Measure field-level accuracy on the fields you use, and look at which errors occur. Errors in descriptions are an inconvenience; errors in amounts are a problem.

Report results by document type. An average across clean and poor scans hides the cases that matter.

Put it into practice

Manual copy-paste is where errors begin

Split rows, drifting balances, missed transactions: they all trace back to re-keying. DocuClipper preserves the bank's layout so debits, credits, and totals tie out the first time.

What affects OCR accuracy

FactorWhy it matters
ResolutionToo few pixels per character blurs shapes. 300 DPI is the common recommendation for text documents.
Skew and rotationTilted lines confuse line and column detection, so values land in the wrong column.
Contrast and backgroundColored backgrounds, watermarks, and faded print reduce the difference between text and page.
NoiseSpeckles, stamps, pen marks, and fold lines get read as characters.
Fonts and layoutVery small type, dot-matrix print, dense tables, and multi-column layouts are harder.
HandwritingStandard OCR is built for print; handwriting needs different recognition and still has higher error rates.
Language and charactersEngines need the right language model; currency symbols and accented characters cause substitutions.

How to improve OCR accuracy

Start with a better source

The biggest gain is often avoiding OCR altogether. A bank statement downloaded as a PDF from online banking usually has a text layer, so the text can be read directly instead of recognized from pixels. Ask clients for downloaded PDFs rather than scans or photos whenever possible.

When you must scan, use 300 DPI, a flat scanner rather than a phone where possible, and grayscale or black and white instead of color for text documents.

Preprocess the image

Preprocessing cleans the image before recognition. The standard steps:

  • Rotation and deskew. Detect page orientation and straighten tilted lines so rows and columns align.
  • Cropping. Remove scanner borders and dark edges that get read as characters.
  • Scaling. Upsample low-resolution images so characters have enough pixels.
  • Binarization. Convert to black and white with a threshold (adaptive thresholding handles uneven lighting better than a single global threshold).
  • Noise removal. Remove speckles and small specks without eroding thin characters such as periods and decimal points, which matter a lot in amounts.
  • Contrast enhancement. Darken faded text and lighten backgrounds.

Each step can hurt as well as help. Aggressive noise removal deletes decimal points; aggressive binarization breaks thin fonts. Measure CER before and after each change on your ground truth sample.

Validate the output

Even good OCR makes errors, so the practical question is how you catch them. For financial documents, use the numbers the document already contains. A bank statement prints an opening and closing balance; if the extracted transactions do not add up to the difference, something was misread or missed. That check catches exactly the errors CER does not weigh: a dropped transaction or a single wrong digit.

This is how DocuClipper handles accuracy on bank statement OCR: text PDFs are read from the text layer, scans go through OCR, and every statement is reconciled against its printed opening and closing balances, with statements that do not tie out flagged for review. See how reconciliation works. For the broader picture of how OCR fits with AI extraction, see OCR vs AI and OCR for bank statements.

FAQ

How do you calculate OCR accuracy?

Compare OCR output to a hand-verified ground truth. Character error rate is (substitutions + deletions + insertions) divided by the number of ground truth characters, and accuracy is 1 minus that rate. Word error rate uses the same formula at word level.

What is a good character error rate?

It depends on the document and the use. For financial data, judge by field-level accuracy on amounts and dates rather than CER alone, because a low CER can still leave wrong amounts.

What is the difference between CER and WER?

CER counts errors per character and WER per word. WER is higher for the same output because one wrong character makes the whole word wrong.

What resolution should I scan at for OCR?

300 DPI is the common recommendation for printed text. Lower resolution blurs character shapes; much higher resolution increases file size without a matching gain.

What is OCR preprocessing?

Cleaning an image before recognition: rotation and deskew, cropping, scaling, binarization, noise removal, and contrast enhancement. Each step should be tested, because overdoing it can remove details like decimal points.

Written by the DocuClipper editorial team. Last updated October 9, 2026.

Next step

Upload your first statement free

No credit card required. See extracted transactions in seconds, then export to Excel, CSV, or QBO when you're ready to scale.

Try DocuClipper free

Automate your financial document workflows

Extract data from bank statements, invoices, and receipts with 99.9% accuracy. Export to Excel, QuickBooks, or Xero in seconds.

Start free trial14-day free trial · No credit card required