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.

Data analysis dashboard with charts and spreadsheets — computed columns document extraction explained for beginners

Key Takeaways

  1. 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.
  2. 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.
  3. 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

Line Total (Qty × Unit Price)
Net Pay (Gross Pay minus all deductions)
Tax Amount (Subtotal × 0.20)

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

{"Line Total": "Multiply Qty by Unit Price for this line item, two decimal places"}

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

Line Total (Qty × Unit Price)

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

Section Subtotal (sum of all Line Total values in the same section)

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

Verification (OK if Subtotal + Tax equals Billed Total, else output the difference)

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

Food Cost % (Unit Cost ÷ 28.00 × 100, where 28.00 is the menu price)

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

Miles Driven (End Odometer minus Start Odometer)

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.

JPG/PNG/PDF Computed Columns

Try adding a computed column: type Line Total (Qty × Unit Price) alongside your other column names.

Frequently Asked Questions

What exactly is a computed column?

A computed column is a column in your output table whose value the AI calculates during extraction, using data it reads from the document. Instead of giving you raw values (Qty = 5, Unit Price = $12) and leaving you to multiply them later, a computed column produces the answer (Line Total = 60) as part of the same extraction pass.

Do I need an account to use computed columns?

No — the column name method works without an account. Type the computation directly into the column name (e.g., "Line Total (Qty × Unit Price)") and the AI performs it during extraction. The Rule Format method — which keeps column names clean by separating the computation into a JSON rule — requires a login. Start with column names in the demo to understand what is possible, then create an account when you are ready to build repeatable workflows.

What kinds of calculations can I define?

Row-level arithmetic (multiply, divide, add, subtract), cross-row aggregation (sum all items in a section), conditional logic (compare values and output a status), fixed parameter references (apply a tax rate or menu price not in the document), and derived values (compute a number the document does not explicitly print). You describe what you want in plain English — the AI reasons through the document to produce the result.

How is this different from adding a formula column in Excel after exporting?

Three differences. First, the calculation happens during extraction, so your exported file already contains the answers — no formula setup needed. Second, a computed column is part of the extraction definition: define it once and it applies to every document in every batch. Third, the AI understands the meaning of the fields it is computing with — it can handle ambiguous inputs (like "Approx. 5 units") that would break a formula that expects a clean number.

Does the AI always get the calculation right?

For row-level arithmetic on clearly labeled numeric fields, accuracy is consistently high. For cross-row aggregation and conditional logic on complex or poorly formatted documents, the AI can be enabled to take additional reasoning steps (known as Precision+ mode) to verify relationships between fields before outputting results. No computation can be accurate if the source values themselves are extracted incorrectly — the foundation is reliable extraction of the input fields. For a deeper look at accuracy factors, see our detailed computed columns guide.

Can a computed column reference values from a different document?

No. Each extraction processes one document independently. A computed column can sum all line items within that document, verify that the printed total matches the sum of parts, or apply a tax rate you specify. It cannot cross-reference values from a separate document — that type of cross-document logic belongs in your accounting software or a post-export consolidation step.

Computed columns mean your spreadsheet arrives with the math already done. Try it on your own invoice.

Upload a Document
📮 contact email: [email protected]