Guide

What to do when OCR gets the numbers on your invoices wrong

The software read the invoice, the spreadsheet looks tidy, and then a total or an invoice number turns out to be wrong. Here is why that happens, how to stop most of it for free, and how to catch the rest before it reaches your books.

Short answer

Fix the page first, because a low resolution, crooked or black and white scan is the usual cause of a misread digit. Then check every number that can be checked, such as subtotal plus GST equalling the total, and look at invoice numbers yourself, because no arithmetic can tell you one of those is wrong.

Why numbers go wrong more quietly than words

When OCR misreads a word, you usually notice, because Thompsen Steal does not look like a real name. When it misreads a digit, the result is still a perfectly ordinary number. There is no dictionary for invoice numbers, so nothing looks out of place.

The usual confusions are shapes that differ by one small stroke: 3 and 8, 5 and 6, 1 and 7, 0 and 8. Decimal points and commas are worse, because they are a few pixels wide and a speck of dust or a fold can add one or remove one.

This is not only an old OCR problem. When we tested AI reading models for our own document tool, across 48 test documents, one of them read a scanned invoice number as 567504 when the page says 587504. Not a blank, not a warning, just a confident wrong number that nobody reading the spreadsheet would ever question.

First, find out whether OCR is even involved

Open the original PDF and try to select the number with your mouse. If you can highlight it, copy it and paste it into Notepad.

If the pasted number is right, the PDF already contains the exact text, typed by the supplier's own software, and OCR never needed to guess. The problem is that your tool picked up the wrong number from the page, often the subtotal instead of the total. Rescanning will not help. You need to tell the tool which label to read, or use one that reads labels rather than positions.

If you cannot select the number, the file is a picture of a page and OCR is doing the reading. The rest of this page is for you.

Fix the page, which is free and fixes the most

  1. 1Ask the supplier to email the invoice as a PDF instead of posting it or handing over a printout. An emailed PDF from accounting software has exact text in it and removes the problem at the source. This is the single best fix and it costs one email.
  2. 2If you have to scan, set the scanner to 300 dpi. Below about 200 dpi small digits stop being reliably readable.
  3. 3Scan in greyscale, not black and white. Black and white mode turns every pixel fully dark or fully light, and on a faint print that can break a thin stroke, which is exactly how an 8 becomes a 3, or erase a decimal point entirely.
  4. 4Straighten the page. Most scanner software has a deskew setting. If you are using the free OCRmyPDF, add the deskew option when you run it.
  5. 5For a phone, use a scanning mode rather than the camera. Notes on iPhone and Scan in Google Drive on Android both flatten and crop the page before anything tries to read it.
  6. 6Rerun the OCR on the improved file and compare. If the same digit is still wrong on a clean 300 dpi greyscale scan, the print itself is the problem, usually faded thermal paper, and you will need to read that one by eye.

Most people go looking for better software when the cheaper fix is a better page. Try these before paying for anything.

Then check every number that can be checked

Some numbers on an invoice have to agree with each other. That means a misread digit leaves evidence, and you can find it with a spreadsheet formula instead of reading every invoice again.

Subtotal plus GST should equal the total
Put the three figures in columns B, C and D and add a column with =ROUND(B2+C2,2)=ROUND(D2,2). Every FALSE is an invoice to look at. A single misread digit in any one of the three figures breaks the sum. It also catches the tool reading the subtotal as the total. Watch for invoices with a discount, a credit or freight shown after the subtotal, which will legitimately show FALSE until you add that line in.
Line items should add up to the subtotal
The same idea one level down. If you capture line amounts, sum them and compare with the subtotal. It is more work to set up and it is worth it for long invoices, where one misread line is easy to miss.
An ABN checks itself
The eleven digit ABN contains its own check digits. The Australian Business Register publishes the method: subtract 1 from the first digit, multiply each digit by 10, 1, 3, 5, 7, 9, 11, 13, 15, 17 and 19 in turn, add the results, and the total must divide exactly by 89. A single wrong digit always fails this. We confirmed that by changing every digit of our own ABN to every other value, and not one altered version passed. For a real check, paste the ABN into ABN Lookup on abr.business.gov.au, which is free, and confirm the name that comes back is your supplier.
GST as one eleventh of the total, with care
If everything on an invoice is taxable, the GST should be the total divided by eleven, give or take a cent of rounding. A figure far away from that is worth a look. Do not treat it as an error on its own, because an invoice with GST free items on it will legitimately differ.
Dates should be possible and recent
An invoice dated in the future, or three years before you started trading with the supplier, is usually a misread. Also check that day and month have not swapped, because 03/04/2026 means March to an American system and April to an Australian one.

The numbers no check can catch

Invoice numbers, purchase order numbers, reference numbers and bank details have no arithmetic behind them. A misread one is indistinguishable from a real one by formula. These are the numbers to look at with your own eyes, and there are a few habits that make it quick.

Compare with the supplier's last invoice
Most suppliers number invoices in sequence. If last month's invoice was 587490 and this one reads 567504, the jump backwards is the clue. Sort the sheet by supplier and then by invoice number and these stand out on sight.
Look for duplicates
A repeated invoice number from one supplier is either a double entry or a misread. Add a column with =COUNTIFS(A:A,A2,E:E,E2), where A is the supplier and E is the invoice number, and anything above 1 needs a look.
Never pay from bank details that were read by software
If a BSB or account number came off a scanned invoice, confirm it against the supplier's details you already hold, or call them on a number you already have. A misread digit sends money to the wrong account, and a changed account number on an invoice is also the classic sign of a payment redirection scam. Treat both the same way.
Check the number against the page, not against memory
When you review, have the original document open beside the spreadsheet row. A number that looks right on its own is exactly the kind that is wrong.

When the tool itself is the problem

If your invoices end up in Xero, QuickBooks or MYOB, use the capture built into those first. They show the document beside the draft bill, so you correct the number in the place where it lands rather than in a spreadsheet you then copy from. For supplier bills that is simply the better workflow, and it is included in the plans you already pay for.

If you are running free OCR such as Tesseract or OCRmyPDF and the page is already clean, the next step up is a reader that understands what an invoice is. Traditional OCR recognises characters one at a time. Newer AI readers look at the whole page, which helps them tell a total from a subtotal, but as the example above shows, they can still produce a plausible wrong digit, so the checks on this page still apply.

We have not measured competing tools against each other, so we will not rank them by accuracy. When you see an accuracy percentage on a vendor's page, ask what documents it was measured on. A figure from clean digital PDFs tells you nothing about your crumpled scans.

The question that matters more than accuracy: what does the tool do when it is unsure. A blank cell costs you a minute. A confident wrong number can cost you a payment to the wrong place, and you will not know to look for it.

Common questions

Why does OCR get numbers wrong?
Digits differ from each other by small strokes, so a low resolution, crooked or black and white scan turns an 8 into a 3 or drops a decimal point. Unlike words there is no dictionary to catch the mistake, so the wrong number looks normal. Scanning at 300 dpi in greyscale and straightening the page fixes much of it.
What resolution should I scan invoices at?
300 dpi, in greyscale. Below about 200 dpi small print becomes unreliable, and black and white mode can break thin strokes in digits even at a good resolution.
How can I tell if an OCR total is wrong without checking every invoice?
Capture the subtotal, the GST and the total, and check in a spreadsheet that the first two add up to the third. A single misread digit in any of them breaks the sum, so you only need to look at the invoices that fail.
How do I check an ABN from an invoice is real?
Search it on ABN Lookup at abr.business.gov.au, which is free, and confirm the business name matches the supplier. The ABN also has built in check digits, so a single misread digit will always fail the published check.
Can I trust bank details read by OCR?
No. Always confirm a BSB and account number against details you already hold for that supplier, or call them on a number you already know. That protects you from a misread digit and from invoices where the account number has been changed on purpose.

Related

Solven builds custom software and automation for Australian businesses. If you have a job like this that no tool quite fits, that is the work we do.

Get a free teardown