Microproduct data guideintermediate

IRS SOI Tax Stats

Statistics of Income tables on individual and business tax returns for building income, filing, and geographic tax-profile tools.

At a glance

Difficulty
Intermediate — some data preparation helps
Size
Small · ≤0.5 GB
Formats
Excel, CSV
Access
Download
API key
Not required
Provider
Internal Revenue Service
Updates
Annual

From source to product signal

Test a product idea in four steps

SOI publishes aggregated individual-income tables, including ZIP-code products. Start with one state's ZIP-code AGI table. These are tabulated tax returns, not household surveys, and ZIP totals can be suppressed for disclosure.

1

Check the setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • An internet connection
2

Access the data

  1. 1.Open the SOI Statistics of Income page and locate Individual Income Tax ZIP Code Data.
  2. 2.Download one recent tax-year CSV or Excel file.
  3. 3.Keep ZIP code, AGI class, number of returns, and total AGI.
Open official source
3

Run the Python example

Install the packages, then run the notebook cell.

python -m pip install pandas

import pandas as pd

soi = pd.read_csv(
    "https://www.irs.gov/pub/irs-soi/22zpallagi.csv",
    nrows=200,
)
print(soi.head())
4

Test a useful signal

Profile ZIP-code AGI classes

Test whether a SOI ZIP extract can power a bounded local-income sketch.

  1. 01Keep state, ZIP, AGI class, return counts, and AGI from the first rows.
  2. 02Sum returns by AGI class for one state abbreviation in the extract.
  3. 03Explain that SOI ZIP tables are tax-return tabulations with disclosure suppression, not ACS income estimates.

Dataset details

Internal Revenue Service is a government source. Last verified 2026-08-18. Temporal coverage: tax years published in SOI annual and geographic products.

Theme

Markets & Economics

Domains

Public FinanceTaxationRegional Economics

Data types

TabularAggregated Data

Tasks

Income AnalysisGeographic ComparisonPublic Finance Research

Geography

United States

Formats

ExcelCSV

Provider

Internal Revenue Service

Data terms

U.S. Government public data / federal copyright guidance