1040 data extraction reads a filed Form 1040 and returns its figures as named, typed fields instead of a picture of a page. A useful result holds the tax year, filing status, the income lines, total income, adjusted gross income, taxable income and total tax, each tied to its line number, and passes simple math checks against the form.
What 1040 data extraction captures
1040 data extraction captures the identity of the return and its key totals: tax year, filing status, each income line, total income, adjusted gross income (AGI), taxable income and total tax. Each value becomes a field with a fixed name and a type, so a figure lands in the same place whichever year or software produced the return.
A field is three things: a name that never changes, the line it came from, and a type that says what kind of value it holds. The name is the part that matters most. Line numbers move between years, and a field called adjusted_gross_income stays put while the line under it shifts from 11 on the 2024 form to 11a on the 2025 form.
An illustrative field table
The table below is an example of how a 1040 extraction could be laid out for the 2025 form. It is labelled as an illustration: the field names are made up for this post and are not Schema Tax's schema. The line numbers and labels come from the 2025 Form 1040.
| Field name (example) | 2025 Form 1040 line | Type |
|---|---|---|
| tax_year | Header ("2025") | integer |
| filing_status | Filing Status checkboxes | one of five values |
| wages_w2_box1 | 1a | money |
| wages_total | 1z | money |
| taxable_interest | 2b | money |
| ordinary_dividends | 3b | money |
| capital_gain_or_loss | 7a | money, can be negative |
| additional_income_schedule_1 | 8 | money, can be negative |
| total_income | 9 | money |
| adjustments_to_income | 10 | money |
| adjusted_gross_income | 11a | money |
| deduction_standard_or_itemized | 12e | money |
| qbi_deduction | 13a | money |
| taxable_income | 15 | money, never below zero |
| total_tax | 24 | money |
| federal_withholding_total | 25d | money |
| total_payments | 33 | money |
| amount_overpaid | 34 | money |
| amount_owed | 37 | money |
Three type choices save trouble later. Money fields should hold numbers, not text with dollar signs and commas. Fields that can go negative, such as a capital loss, need a sign, because a loss printed in parentheses on the form is easy to read as a positive amount. And filing status should be one of a fixed set of values rather than free text, since the 2025 form offers exactly five boxes: single, married filing jointly, married filing separately, head of household and qualifying surviving spouse.
Personal details sit on the same page: names, address, and Social Security numbers. Most uses of extracted return data do not need the full SSN. Schema Tax masks SSNs and TINs to the last four digits before anything is written to storage, which its security section describes along with retention and encryption.
Does tax return data extraction cover schedules and K-1s?
Tax return data extraction can cover far more than the two pages of the 1040, because a filed return PDF often carries schedules and statements behind it. What a tool covers depends on its form list. Schema Tax lists the Form 1040 and the Schedule K-1 among its supported forms; numbered and lettered schedules are not on that list.
A full return is a stack. Behind the 1040 come numbered schedules that feed it: the 2025 Schedule 1, for example, totals additional income on its line 10 and says to enter that amount "on Form 1040, 1040-SR, or 1040-NR, line 8". Lettered schedules such as A, B, C, D and E sit behind those, followed by other forms that apply to the filer.
The 1040 itself already holds the totals from those schedules. On the 2025 form, line 8 carries the Schedule 1 total, line 17 carries an amount from Schedule 2, line 20 carries an amount from Schedule 3, and line 23 carries other taxes from Schedule 2, line 21. An extraction of the 1040 alone captures the totals those schedules pass to it, though not the detail behind them.
K-1s are a separate case. A Schedule K-1 is a statement a partnership, S corporation or trust sends to each owner or beneficiary. The Partner's Instructions for Schedule K-1 (Form 1065) tell the partner to keep the K-1 for their records and not to file it with the return unless specifically required. So a K-1 may arrive as its own PDF, apart from the return, and is read as its own form.
When a return PDF mixes the 1040, schedules and K-1s, the first job is to sort the pages by form type. Schema Tax classifies each page by form type and tax year, even when one PDF mixes several forms, and reads the pages that belong to forms on its list.
Is prior year tax return import the same as 1040 data extraction?
Prior year tax return import and 1040 data extraction are different jobs. Import usually means loading last year's return into tax-preparation software so that the next return starts with carried-forward details. Extraction means getting the return's figures out as data, such as JSON, CSV or Excel, for use somewhere else.
The direction is the difference. Import moves data into a preparation product, in whatever format that product accepts. Extraction moves data out of a filed document, into a format the reader chooses. A preparer bringing a new client's prior return into their software is doing an import. A lender putting three years of AGI into a spreadsheet, or a developer storing return totals in a database, is doing an extraction.
Schema Tax sits on the extraction side only. It does not import data into tax software and it does not prepare or file returns. Its outputs are JSON, CSV and Excel files, and the same JSON through an API billed per page. The figures can then go wherever the reader takes them, including into a preparation product by hand.
Extracted figures are also a reference rather than a replacement for the return. If the return was amended, the IRS Instructions for Form 1040-X describe a column of correct amounts that supersedes the original figures for the changed lines. Data pulled from the original 1040 does not reflect that change, so the source document for each year should be recorded with the data.
A 1040 parser on digital PDFs from tax software
A 1040 parser works best on a digital PDF saved straight from tax software, because that file usually carries the form's text and numbers as text rather than as an image. A scanned or photographed return holds only a picture of each page, which needs optical character recognition (OCR) before any parsing can start.
A quick test tells the two apart. Open the PDF and try to select a word or a dollar amount with the cursor. If the text highlights and can be copied, the file has a text layer. If the whole page selects as one block, or nothing selects at all, the file is an image.
A text layer helps, but it is not the whole job. The characters may come out in an order that follows the page's drawing commands rather than the form's lines, so the amount for line 9 can appear next to the label for line 10. A parser still has to pair each label with the right value by position on the page. It also has to clean each amount: strip commas and dollar signs, turn parentheses into a minus sign, and keep a blank line distinct from a zero.
Image files add a recognition step before all of that. Paper returns from earlier years, client copies and faxes usually fall into this group, and their particular problems are covered in the section on why paper 1040s need tax return OCR.
For developers, both paths should end at the same output. A caller should not have to know whether a return began life as a text PDF or a phone photo; the fields and their names should match either way. The tax form API category covers how that output is requested and returned.
Math checks for extracted 1040 lines
Math checks for extracted 1040 lines recompute each total from the lines the form says to add or subtract, then compare the result with the value read off the page. If total income, AGI and taxable income do not agree with the lines above them, at least one value was misread, mistyped or taken from the wrong line.
The 2025 form prints each calculation next to its line, which makes the checks easy to write:
| Check | Rule printed on the 2025 Form 1040 |
|---|---|
| Total income | Line 9 = lines 1z + 2b + 3b + 4b + 5b + 6b + 7a + 8 |
| Adjusted gross income | Line 11a = line 9 minus line 10 |
| Deductions | Line 14 = lines 12e + 13a + 13b |
| Taxable income | Line 15 = line 11b minus line 14, or zero if that is zero or less |
| Total tax | Line 24 = lines 22 + 23 |
| Withholding | Line 25d = lines 25a + 25b + 25c |
| Total payments | Line 33 = lines 25d + 26 + 32 |
| Refund or balance due | Line 34 = line 33 minus line 24 when payments exceed tax; otherwise line 37 = line 24 minus line 33 |
Rounding
A check should allow for whole-dollar rounding. The 2025 Instructions for Form 1040 say a filer can round off cents to whole dollars and, if they do, must round all amounts, dropping amounts under 50 cents and raising amounts from 50 to 99 cents to the next dollar. A sum of rounded lines can differ from a rounded total by a dollar or two, so a tolerance of a few dollars avoids false alarms.
A worked example
Take an example 2025 return with fictional figures: line 1z of $84,000, line 2b of $1,150, line 3b of $2,300, line 7a of $4,850 and line 8 of $0. The sum is $92,300. If the extracted total income reads $92,800, the check fails by $500. The likely causes are a misread digit, often a 3 read as an 8, or a value picked up from a neighbouring line. Either way the field goes back for review before anything uses it.
A passing check does not prove every line is right; two errors can cancel out. It does catch the common single misread. Schema Tax recomputes totals as one of its five steps from upload to export and flags uncertain values for review on an editable view of the form.
1040 data extraction edge case: statements and carryover worksheets
Statements and carryover worksheets are the most common 1040 data extraction edge case. A return PDF printed from tax software often includes pages that are not IRS forms at all: supporting statements, worksheets, carryover schedules and summary pages. They contain plausible numbers with line-like labels, and they should not be read as if they were the 1040.
A supporting statement is a page that lists the detail behind one form line, such as several sources of other income adding up to one figure. A carryover worksheet records an amount that moves from one tax year to the next, such as an unused loss. Both carry real numbers, and both can name a 1040 line in their headings, which is exactly why a careless extraction can mistake them for the form.
Three habits keep them out of the data. First, sort every page by type before reading values; a page that is not a recognised form should be set aside, not parsed. Second, read the tax year from the form's own header, not from a worksheet that may show both the prior and the current year side by side. Third, keep the statement pages with the return as reference, even if they produce no fields, because a reviewer may need them to explain a figure.
K-1 packages raise the same issue. The Partner's Instructions for Schedule K-1 (Form 1065) describe statements a partnership attaches for some codes and for each activity when it has more than one. Those pages explain the K-1's boxes; they are not extra K-1s.
Once the pages are sorted and the figures pass their checks, the usual next step is a spreadsheet. The post on getting a 1040 to Excel walks through that step and the checks to run on the finished sheet.