Blog
7 min read

How to Add Up Invoice Totals Across Hundreds of PDFs

TL;DR: To total invoices across hundreds of PDFs, you need every invoice's amount in one table first. You can type them in yourself, use a template-based extraction tool, or ask an AI. Chat assistants work for a handful of files but get unreliable at scale, because they can only read so much at once. An AI agent that reads one field from every file into a table and then adds it up like a spreadsheet gives an exact total, tells you how many files it covered, and can break the total down by vendor or month.

"What did we spend with each supplier this year?" sounds like a five-minute question. If the answer lives in 600 invoice PDFs spread across folders, half of them scanned, it's a two-day job.

The arithmetic isn't the hard part. The hard part is getting one number out of each of 600 documents that all look different. Here are four ways to do that, and where each one breaks.

Why is totaling invoices across PDFs so hard?

PDFs store how a page looks, not what the numbers mean. The total on one vendor's invoice is bottom right and labeled "Amount due." On another it's "Balance," in a table, in euros. Scanned invoices are just pictures until something reads them. No formula can point at "the total" across documents that each put it somewhere else.

So every method comes down to the same two steps: extract the fields you need from each file into rows, then compute over the rows. The methods differ in who does the extraction and how much you can trust it.

Method 1: Type them into a spreadsheet

Open each invoice, copy the vendor, date, invoice number and total into a row, and use SUMIFS or a pivot table at the end.

Good for: up to 50 or so invoices, or when you need to check each one anyway.

Breaks at: a few hundred. It takes about a minute per invoice when things go well. Typos creep in, and you can't tell which rows are wrong without opening the files again.

Method 2: Use a template-based extraction tool

Tools built for invoice data capture let you mark where each field sits on a vendor's layout, then extract it from every invoice that matches. Excel's Power Query can also pull tables out of text-based PDFs.

Good for: high volumes from a small set of vendors whose layouts don't change, such as a monthly run of the same twenty suppliers.

Breaks at: variety. Every new vendor or redesigned invoice needs a new template, and Power Query can't read scans. More on this trade-off in extract data from documents without templates.

Method 3: Ask a chat AI

Upload the invoices to ChatGPT, Claude or Gemini, or point it at a folder, and ask for the totals.

Good for: a dozen invoices, or a quick sanity check. These models read invoices well, scans included.

Breaks at: volume. A chat assistant reads files into the conversation, and a conversation only holds so much. With hundreds of files, it either reads a subset or summarizes as it goes, and the total you get back may cover fewer invoices than you think. Adding up hundreds of numbers inside the model's reply is also where small arithmetic slips happen. Rerun the same question and you may get a slightly different answer.

The tell is when you can't easily see how many invoices the answer is based on.

Method 4: Use an AI agent that builds a table first

The approach that holds up at scale splits the job the way a careful person would: the AI reads every file and extracts the fields into a table, then the table is added up by code, exactly, the way a spreadsheet does it.

That's how The Drive AI's agent answers questions across many files. A request like this:

What did we spend with each vendor in 2026? Use every invoice under /Finance, including the scans.

runs in three steps:

  1. Sample. The agent reads a few invoices and proposes the fields it'll extract (vendor, invoice date, invoice number, total, currency) so you can correct them before it reads the rest.
  2. Build. It reads that set of fields from every matching file into a table, in the background. Scans are read too. An invoice it has already read isn't read again, so a follow-up question reuses what it extracted.
  3. Compute. The totals are calculated over the table with real grouping and sums, not estimated in prose. The answer says how many files it covered, and if its selection left out files of the same type in that folder, it says that too.

From there you can keep going in the same conversation:

  • Break that down by month and show it as a chart.
  • Which invoices are over $5,000?
  • Group by invoice number and show any that appear more than once. A quick way to spot duplicate billing.
  • Export the table to Excel.
  • Move every invoice over $5,000 into /Finance/Review. The selection becomes a change you preview and approve, and it can be undone.

It works on files in your The Drive AI workspace and in connected Google Drive, OneDrive, SharePoint and Dropbox folders, so invoices spread across two clouds end up in one table. If you'll ask again next month, the table can stay current as new invoices arrive.

How many files can it read at once?

It depends on the plan. Each request can read up to 50 files on Free, 500 on Premium, 5,000 on Max and Team, and 10,000 on Business. Connected drives need Max or a Team plan. For a recurring version of this job, such as reading each new invoice as it arrives and filing it by vendor and year, set up an accounts payable workflow instead of asking each month.

Which method should you use?

InvoicesLayoutsBest method
Under 50AnySpreadsheet by hand, or a chat AI
HundredsFew vendors, stable layoutsTemplate-based extraction
Hundreds to thousandsMany vendors, scans, mixed formatsAI agent that builds a table first
Every month, ongoingAnyA workflow that extracts as invoices arrive

Whatever you use, check the total two ways before you rely on it: confirm the file count matches the number of invoices you expected, and open five invoices at random and compare their rows.

Frequently Asked Questions

How do I add up totals from multiple PDF invoices?

Extract each invoice's total into a table, then sum the table. For a few dozen invoices, type them into a spreadsheet. For hundreds with varied layouts, use an AI agent that reads every invoice into a table and then computes the totals exactly, reporting how many files it covered.

Can ChatGPT add up invoices from PDFs?

For a small number of invoices, yes, and it reads scans well. With hundreds, a chat assistant may only read part of the set and won't always make clear how many invoices the total includes, so check the count before relying on it.

Can Excel extract totals from PDF invoices?

Power Query can import tables from text-based PDFs, which works for consistent layouts. It can't read scanned invoices, and every layout needs its own setup.

How do I find duplicate invoices across PDFs?

Extract the invoice number and vendor from every invoice into a table, then group by invoice number and look for any that appear more than once. Identical files can also be found by content, even if they have different names.

Can AI read scanned invoices?

Yes. Modern AI models read scanned and photographed invoices, including handwriting in many cases. Accuracy depends on scan quality, so spot-check a sample, especially low-resolution scans.

Start with one question

Pick a question you'd normally spend an afternoon on, like spend by vendor last quarter, and ask it over the folder where those invoices live. Check the file count, open a few rows against the originals, and then ask the follow-up you never had time for.

Share it with your network

You might also find useful