Computed Columns for Beginners:
Extract and Calculate in One Step
Most document extraction tools stop at reading. They give you what is printed on the page — a quantity in one column, a unit price in another. But the number you actually need — the line total, the net pay, the food cost percentage — that number isn't printed. It's implied by the data. And until recently, someone had to open Excel and calculate it after the extraction was done.
Key Takeaways
- Every extraction tool hands you Qty = 5 in one cell and Unit Price = $12 in another — then calls the job done. The multiplication you still have to do yourself.
- Excel formulas reference cells by position (B2×C2), so "Approx. 5 units" breaks the formula — but AI reads it as 5 because it understands what the number means, not where it sits.
- Type "Line Total (Qty × Unit Price)" into ImageToTable.ai's column name field, upload any document, and calculated results arrive in the output — no formula bar, no dragging cells.
What Is a Computed Column?
A computed column is a column in your output table whose value the AI calculates during extraction — rather than simply copying it from the document.
In a standard document extraction, you tell the tool what fields to find: "Invoice Number," "Date," "Vendor Name." The tool reads the document, locates those values, and places them in your output. What you get back is exactly what was printed.
A computed column adds one more instruction: take the extracted values and do something with them.
Consider an invoice line item. The document shows Qty = 5 and Unit Price = $12. A standard extraction gives you two cells: one with 5, one with 12. A computed column gives you a third cell — with 60 in it. The AI multiplied the two numbers during extraction, and the answer arrived in your spreadsheet without you writing a single formula.
The key distinction is when the calculation happens. In a traditional workflow — whether you are using OCR, AI extraction, or manual data entry — the calculation happens after extraction, in a separate tool. Computed columns move the calculation into the extraction itself. The output you download is already the finished product.
If you are new to document extraction in general, our beginner's guide to AI document extraction covers the fundamentals of how the AI reads your documents in the first place. This article assumes you understand that basic concept and focuses on the computation layer that sits on top of it.
Why Not Just Do It in Excel?
The first question most people ask is: can't I just add a formula column after exporting? The answer is yes — and that is exactly what people have been doing for years. The real question is what you gain by not doing it that way.
Scale changes the equation. A single invoice with 5 line items means 5 formulas. A batch of 30 invoices — each with 10 to 40 line items — means hundreds. One misplaced formula reference in a batch that large produces a wrong number, and wrong numbers in finance have a way of compounding. It is not that Excel is bad at formulas. It is that formula creation scales linearly with document volume, while verification effort scales faster.
Formulas live in the spreadsheet, not in the workflow. Every time you extract a new batch of invoices, you either recreate the formulas or copy a template sheet and hope the ranges still match. A computed column is part of the extraction definition — define it once, and it applies to every document in every batch from then on.
Some calculations require context Excel cannot see. A formula cell references other cells by position — B2×C2. It does not know that B2 is a quantity and C2 is a unit price. It just multiplies whatever is there. An AI performing the same calculation understands the relationship between the fields. When a document labels quantity as "Approx. 5 units" or puts the unit price in a paragraph rather than a column, the AI can still reason through it. A formula cannot.
None of this means you should stop using Excel. It means the extraction step can deliver a spreadsheet where the math is already done — and Excel becomes a place for analysis rather than arithmetic.
Two Ways to Define a Computation
ImageToTable.ai offers two methods for defining computed columns. They produce the same result but serve different stages of your workflow.
Column Name Method — Try It Without an Account
The simplest way: write the computation directly into the column name. The AI reads the full column name — label plus instruction — and figures out what you want.
Example column names
This method works immediately in the guest demo — no login, no configuration. The trade-off is that column headers become long when the computation is complex, which can make the output table harder to scan.
Rule Format — For Repeatable Production Workflows
For logged-in users, the alternative is Rule Format: keep the column name clean (e.g., "Line Total") and define the computation logic in a separate JSON rule. This keeps your output headers tidy and allows more detailed instructions — formatting rules, decimal precision, fallback values.
Example Rule Format
The best way to start: use the column name method to test a computation on a few documents. Once you are confident the logic works, move it to Rule Format for your regular workflow. Both methods rely on the same underlying AI reasoning — the difference is only in where you write the instruction.
Five Things Computed Columns Can Do
Here are the five types of computation you can define, arranged from simplest to most powerful. Each includes a real column name you can copy into the demo at the end of this article.
1. Row-Level Arithmetic
Multiply, divide, add, or subtract values that appear on the same row or in the same section of the document. This is the most common use — and the one that replaces the most Excel formulas.
Real example
Use this when a document shows individual inputs but not their combined result. Invoices that print quantity and price but omit the line total — for a full walkthrough of setting up an extraction workflow from scratch, see our guide on how to extract invoice fields to Excel. Job sheets listing hours worked and hourly rate but leaving the labor total for you to calculate. Mileage logs with start and end odometer readings.
2. Cross-Row Aggregation
Sum, average, or otherwise combine values from multiple rows that belong to the same group or section. This is where formula-based approaches break — they require you to manually define ranges, and ranges change with every document.
Real example
The AI identifies section boundaries by reading the document's visual structure — headings, spacing, table grouping — and aggregates only the rows that belong. You do not select a range; you describe what to sum, and the AI determines which rows qualify.
3. Conditional Logic
Compare values and output a result that depends on the comparison. This turns manual reconciliation — checking whether numbers add up — into a single output column.
Real example
You can use conditional columns to flag invoice discrepancies, verify that payslip deductions sum correctly to net pay, or check that a purchase order total matches the sum of its line items. The column does not just extract — it audits.
4. Fixed Parameter References
Embed a value in the computation that the document does not contain — a tax rate, a menu price, a standard markup percentage. The AI treats it as a given constant.
Real example
This is useful when the answer depends on information that lives outside the document — in your pricing sheet, your tax reference card, or your contract terms. You provide the parameter once in the column definition, and the AI applies it to every row.
5. Derived Values From Unprinted Data
When a document omits a value you need but contains the ingredients to calculate it, the AI can derive the missing number.
Real example
This is a distinct capability from arithmetic — the AI is not just computing from two extracted values. It is noticing that a value is absent, identifying the fields needed to derive it, extracting those, and computing the result. A formula cannot do the first step. A human would have to notice the gap, add the formula, and fill it manually.
For a deeper technical walkthrough of these five patterns — including cross-row awareness, ambiguity handling, and when to enable Precision+ mode — see our detailed guide to computed columns.
What Computed Columns Cannot Do
Honesty about limits is as important as clarity about capabilities. Here is what computed columns do not handle:
Cross-document references. Each extraction processes one document independently. A computed column can verify that an invoice's line items sum to its printed total. It cannot check whether the invoice total matches a corresponding entry in your general ledger — that data lives in a different system.
Replace your accounting or ERP software. Computed columns produce answers during extraction. They do not post journal entries, update inventory, or trigger approval workflows. Think of them as the layer that turns raw documents into verified, calculation-complete data — ready for import into whatever system you use downstream.
Work around unreadable source documents. If the AI cannot read the quantity or the unit price — because the scan is too blurry, the handwriting is illegible, or the field is simply missing — no computation can compensate. The rule of thumb: if a person looking at the document could compute the answer from the information visible on the page (plus any fixed parameters you provided), the AI can too. If a person cannot, the AI will not either.
Try It in 30 Seconds
The column name method requires no account. Type a computed column name into the demo below, upload a document, and see the calculation appear in the output — the same step that extracted the data also performed the math.
Try adding a computed column: type Line Total (Qty × Unit Price) alongside your other column names.