*** September 2026 Major Release ***Read and watch
Document type

Extracting data from Form 1040 returns

Individuals file about 160 million Form 1040 returns a year, each printed by tax software or a preparer on that year's IRS layout. Mortgage lenders collect two years of them from borrowers whose income calls for returns, uploaded to a borrower portal as PDFs and scans of signed copies.

Underwriting needs the filing status, wages, total income, adjusted gross income and total tax. The lender checks those against the IRS tax return transcript it requests with Form 4506-C, then carries them into the income calculation.

Page 1 of a sample Form 1040, with extracted values outlined
18,264Markdown characters
569parse blocks
49fields extracted
The problem

What makes Form 1040 returns hard

Filing status is a checkbox row

Five filing statuses share one row of checkboxes, and the one ticked sets the standard deduction and tax brackets behind every line below it.

One amount on several lines

A return with a single income source prints the same figure for wages, total income and adjusted gross income, each on its own numbered line.

Totals from attached schedules

Several lines carry totals from Schedules 1, 2 and 3, so a complete return arrives as the 1040 with its numbered schedules and forms.

How it works

Parse, extract, verify

1

Parse

Parse turns the document into reading-order Markdown and a hierarchy of blocks (text, tables, figures), and grounds each block to its exact location on the page.

2

Extract

You define the fields in a JSON schema, and Extract returns their values in a consistent, structured format, each linked back to where it appears in the Markdown.

3

Verify

Each value links back to where it appears, down to the character range in the Markdown, and the page and bounding box in the source document, so every result can be verified.

Worked example

One Form 1040, end to end

About this document: Pages 1 and 2 of a Form 1040 from an IRS e-file test scenario, published so tax software vendors can check their output. A married couple filing jointly, invented by the IRS and filled in as test data across two portrait pages. Page 1 is featured. The form carries draft banners from the testing system, and every value on it is test data.

Processing objective: The objective is to read the return's status and its income ladder. Two answers come from checkboxes, and three income lines print the same amount, so each value has to be tied to its own line. Every one grounds to the box or cell that prints it.

Demonstration fields: Filing status (checkbox), Digital assets question (checkbox), W-2 wages (line 1a), Total income (line 9), Adjusted gross income (line 11a)

The document

2 of 2 pages
  • Page 1 of the sample Form 1040Page 1shown below
  • Page 2 of the sample Form 1040Page 2

Where each value came from

Page 1 of the sample Form 1040, with every featured field outlined
Filing status (checkbox)filing_status
married_filing_jointly
The region of the sample Form 1040 containing Filing status (checkbox), with the extracted value outlined
extraction_metadata["filing_status"]
{
  "value": "married_filing_jointly",
  "page": 1,
  "range": {
    "end": 1901,
    "start": 1844
  },
  "box": {
    "xmin": 0.15584,
    "ymin": 0.27365,
    "xmax": 0.4698,
    "ymax": 0.28831
  }
}
Digital assets question (checkbox)digital_assets
no
The region of the sample Form 1040 containing Digital assets question (checkbox), with the extracted value outlined
extraction_metadata["digital_assets"]
{
  "value": "no",
  "page": 1,
  "range": {
    "end": 2641,
    "start": 2507
  },
  "box": {
    "xmin": 0.1537,
    "ymin": 0.36282,
    "xmax": 0.94595,
    "ymax": 0.3753
  }
}
W-2 wages (line 1a)income.wages_w2_box1
31,620
The region of the sample Form 1040 containing W-2 wages (line 1a), with the extracted value outlined
extraction_metadata["income.wages_w2_box1"]
{
  "value": 31620,
  "page": 1,
  "range": {
    "end": 4881,
    "start": 4875
  },
  "box": {
    "xmin": 0.82348,
    "ymin": 0.56846,
    "xmax": 0.942,
    "ymax": 0.58369
  }
}
Total income (line 9)income.total_income
31,620
The region of the sample Form 1040 containing Total income (line 9), with the extracted value outlined
extraction_metadata["income.total_income"]
{
  "value": 31620,
  "page": 1,
  "range": {
    "end": 8419,
    "start": 8413
  },
  "box": {
    "xmin": 0.82355,
    "ymin": 0.91688,
    "xmax": 0.94209,
    "ymax": 0.93205
  }
}
Adjusted gross income (line 11a)income.adjusted_gross_income
31,620
The region of the sample Form 1040 containing Adjusted gross income (line 11a), with the extracted value outlined
extraction_metadata["income.adjusted_gross_income"]
{
  "value": 31620,
  "page": 1,
  "range": {
    "end": 8746,
    "start": 8740
  },
  "box": {
    "xmin": 0.82356,
    "ymin": 0.94717,
    "xmax": 0.9421,
    "ymax": 0.96235
  }
}

How to try it yourself

Everything on this page is reproducible. The sample, its schema, and the Parse and Extract API outputs are published. You can repeat the same two calls from whichever surface you already build on.

  • Claude Skilldescribe the job; the agent writes it
  • CLIno code at all
  • MCPexpose ADE docs as an agent tool
  • REST APIany language
  • Pythonlandingai-ade
  • TypeScriptlandingai-ade
Why LandingAI?

Documents into data

Accurate

The best accuracy on the difficult documents other tools get wrong, such as messy scans, complicated tables, checkboxes and handwriting.

Auditable

Every answer cites its sources. Values come back with an audit trail (page, bounding box, character range) so a human can review them.

Agentic

Applies multi-step reasoning, and plans before it acts. Handles documents it has never seen before and adapts to variations.

API-first

Composable APIs that drop into any tech stack and can be called from anywhere. Easy to build on and embed in your pipelines and products.

Affordable

Cost-competitive rates with complete price transparency. Spend controls before you run, and every job reports its exact cost.

Enterprise-grade

Built for production and scale from day one. Fully observable and monitored, running securely in our cloud or yours.

Built for high-volume, high-throughput production

  • Zero data retention
  • Priority rate limits
  • Enhanced support
  • VPC and on-prem deployment

Available on Team and Enterprise plans.

Compare plans
Capabilities

Form 1040 processing highlights

Filing status checkboxes
Yes and no questions
Every numbered amount line
Wages, income and AGI
Deductions and taxable income
Total tax and payments
Digital asset question
Taxpayer and spouse details
Refund and amount owed
Labels that change by year
Native PDFs and scans
Bounding box for every value
FAQs

Questions, answered

Yes. Parsing writes every checkbox into the Markdown in one standard form, marked checked or unchecked beside its label. Define filing status as a field with the five options and the ticked one comes back as its value.

Each field in the schema names its line, such as wages on line 1a or adjusted gross income. Extraction returns each line's value under its own name, and each grounds to that line's own amount cell.

Yes. Describe each field by what it means, and use x-alternativeNames to list the other labels it may appear under. That helps extraction locate a value whose wording or line number changed in a later revision.

Yes. Each question prints a pair of checkboxes, and parsing marks which one is ticked. A field for the digital asset question comes back as yes or no, grounded to the line that asks it.

Every extracted value carries the character range it was quoted from in the parsed Markdown. The Ground API maps that range to a page and a bounding box, so a reviewer sees each amount on the line that printed it.

Start extracting Form 1040 data

Reliable, structured outputs with full traceability in minutes