IRS SOI Individual Income Tax Statistics ZIP Code Data 2022 (with AGI)
- Rows
- 166,131
- Columns
- 165
- Data range
- 0 to 99999
ZIP Code data showing selected income and tax items classified by State, ZIP Code, and size of adjusted gross income for tax year 2022. Includes number of returns, AGI, wages, dividends, interest, etc. Federal IRS SOI data, all states combined CSV.
AI analysis
IRS SOI ZIP Code Income Tax Data 2022 — Analytical Overview
1. Dataset Value and Context Sourced directly from the IRS Statistics of Income division at https://www.irs.gov/pub/irs-soi/22zpallagi.csv, this dataset represents one of the most granular publicly available snapshots of American household income and tax behavior at the ZIP code level for tax year 2022. It aggregates 166,131 rows across 165 columns, with each row representing a unique combination of ZIP code and AGI income bracket (agistub 1–6), enabling both geographic and income-stratified analysis simultaneously. The breadth of variables — spanning wages, dividends, interest income, retirement distributions, tax credits, filing status, and net tax liability — makes this an exceptionally rich foundation for socioeconomic correlation studies. Because the IRS publishes this annually, it also supports year-over-year trend analysis when joined with prior SOI releases.
2. Data Quality Observations Data quality is notably strong: zero null cells are recorded across all 165 columns and all 166,131 rows, which is rare for a dataset of this size and complexity. No type mismatches are flagged. However, one column demands immediate attention: A00400 (which likely represents tax-exempt interest) shows min=0, max=0, mean=0, σ=0, skew=NaN and only 1 distinct value — it is effectively a dead column carrying no information, almost certainly suppressed by the IRS for disclosure reasons. This should be excluded from any modeling or correlation work. Separately, many columns (VITA, TCE, VITAEIC, TOTALVITA, N09600, N19500, N19530, N19570) have medians of zero and Q1=Q3=0, indicating these fields are populated for only a small fraction of ZIP/AGI combinations, meaning they are sparse rather than missing — still valid but requiring careful treatment (e.g., zero-inflated models). Duplicate row counts are noted as pending Phase D recomputation but are not expected to be significant given the natural uniqueness of the zipcode × agistub composite key.
3. Key Column Distributions and Notable Patterns The core income measure A00100 (Adjusted Gross Income, in thousands of dollars) has a mean of ~$177K but a median of only ~$19K, with a skewness of 125 and 18,422 flagged outliers — a textbook illustration of right-skewed income distribution where a small number of high-income ZIP codes dramatically inflate the mean. A00200 (wages and salaries) follows a similar pattern: mean ~$115K, median ~$12.9K, skew of 112. A01000 (net capital gains) is even more extreme with mean ~$12.8K, median just $161, skew of 182, and 24,146 outliers, reflecting the hyper-concentration of investment income among the wealthiest ZIP codes. Filing status columns show interesting household composition signals: mars1 (single filers) has a skew of 84 with median of 100, while MARS2 (joint filers) has median 110 — nearly equal at the median, but joint filers dominate in high-income stubs. N1 (total returns per ZIP/AGI cell) has a median of 280 but a maximum of ~4.56M (likely large urban ZIP codes), with skew of 67.4 and 16,710 outliers, making population-weighting essential for any aggregate analysis. The ELDERLY column (returns with elderly exemptions) has a median of 90 and reasonable spread, making it useful for aging-population correlations.
4. Recommended Join Key Columns The natural composite join key is zipcode + agistub, which together define each unique row. For cross-dataset joins, zipcode (Integer, 0–99999, 27,590 distinct values, zero nulls) is the primary geographic linker and should be treated as a 5-digit string with zero-padding to avoid matching errors on ZIP codes beginning with 0 (e.g., New England ZIPs like 02101). STATEFIPS (Integer, 51 distinct values) and STATE (String, 51 distinct values) provide rollup keys for state-level aggregation. Note that zipcode=0 rows are an IRS convention representing state-level or non-geographic aggregates and should be filtered or handled separately before geographic joins — the min=0 for zipcode is a flag here. For income-stratified joins, agistub (1=under $25K through 6=over $200K) enables bracket-matched joining with other income-classified datasets.
5. Recommended Pairing Datasets for Correlation Discovery This dataset pairs exceptionally well with several complementary sources. U.S. Census Bureau ACS 5-Year Estimates at the ZIP/ZCTA level would enable correlations between tax-reported income and Census-reported demographics (race, education, housing costs, commute patterns) — a natural match via ZIP code. Bureau of Labor Statistics Occupational Employment data by geographic area could reveal how industry and occupation mix correlates with AGI levels and capital income ratios. HUD Fair Market Rents and housing cost data by ZIP would let analysts test whether high-AGI ZIPs show disproportionate mortgage interest deductions (A18500) or real estate tax burdens. Small Business Administration loan data or Census Business Patterns could be joined to explore how self-employment income (A00900, skew=105) and partnership/S-corp distributions (A26270) correlate with local business density. Finally, CDC PLACES health outcomes data at the ZIP/county level would enable a public health lens — testing whether high-AGI concentration correlates with better health outcomes, or whether the ELDERLY variable density predicts healthcare utilization patterns. All of these joins are feasible via ZIP code with appropriate ZCTA crosswalk tables where needed.
Columns
- zipcode (integer)
- agi_stub (integer)
- STATEFIPS (integer)
- STATE (string)
- N1 (decimal)
- mars1 (decimal)
- MARS2 (decimal)
- MARS4 (decimal)
- ELF (decimal)
- CPREP (decimal)
- PREP (decimal)
- DIR_DEP (decimal)
- VRTCRIND (decimal)
- N2 (decimal)
- TOTAL_VITA (decimal)
- VITA (decimal)
- TCE (decimal)
- VITA_EIC (decimal)
- RAC (decimal)
- ELDERLY (decimal)
- A00100 (decimal)
- N02650 (decimal)
- A02650 (decimal)
- N00200 (decimal)
- A00200 (decimal)
- N00300 (decimal)
- A00300 (decimal)
- N00400 (decimal)
- A00400 (decimal)
- N00600 (decimal)
- A00600 (decimal)
- N00650 (decimal)
- A00650 (decimal)
- N00700 (decimal)
- A00700 (decimal)
- N00900 (decimal)
- A00900 (decimal)
- N01000 (decimal)
- A01000 (decimal)
- N01400 (decimal)
- A01400 (decimal)
- N01700 (decimal)
- A01700 (decimal)
- SCHF (decimal)
- N02300 (decimal)
- A02300 (decimal)
- N02500 (decimal)
- A02500 (decimal)
- N26270 (decimal)
- A26270 (decimal)
- N25870 (decimal)
- A25870 (decimal)
- N02900 (decimal)
- A02900 (decimal)
- N03220 (decimal)
- A03220 (decimal)
- N03300 (decimal)
- A03300 (decimal)
- N03270 (decimal)
- A03270 (decimal)
- N03150 (decimal)
- A03150 (decimal)
- N03210 (decimal)
- A03210 (decimal)
- N04450 (decimal)
- A04450 (decimal)
- N04100 (decimal)
- A04100 (decimal)
- N04200 (decimal)
- A04200 (decimal)
- N04470 (decimal)
- A04470 (decimal)
- A00101 (decimal)
- N17000 (decimal)
- A17000 (decimal)
- N18425 (decimal)
- A18425 (decimal)
- N18450 (decimal)
- A18450 (decimal)
- N18500 (decimal)
- A18500 (decimal)
- N18800 (decimal)
- A18800 (decimal)
- N18460 (decimal)
- A18460 (decimal)
- N18300 (decimal)
- A18300 (decimal)
- N19300 (decimal)
- A19300 (decimal)
- N19500 (decimal)
- A19500 (decimal)
- N19530 (decimal)
- A19530 (decimal)
- N19570 (decimal)
- A19570 (decimal)
- N19700 (decimal)
- A19700 (decimal)
- N20950 (decimal)
- A20950 (decimal)
- N04475 (decimal)
- A04475 (decimal)
- N04800 (decimal)
- A04800 (decimal)
- N05800 (decimal)
- A05800 (decimal)
- N09600 (decimal)
- A09600 (decimal)
- N05780 (decimal)
- A05780 (decimal)
- N07100 (decimal)
- A07100 (decimal)
- N07300 (decimal)
- A07300 (decimal)
- N07180 (decimal)
- A07180 (decimal)
- N07230 (decimal)
- A07230 (decimal)
- N07240 (decimal)
- A07240 (decimal)
- N07225 (decimal)
- A07225 (decimal)
- N07260 (decimal)
- A07260 (decimal)
- N09400 (decimal)
- A09400 (decimal)
- N85770 (decimal)
- A85770 (decimal)
- N85775 (decimal)
- A85775 (decimal)
- N10600 (decimal)
- A10600 (decimal)
- N59660 (decimal)
- A59660 (decimal)
- N59661 (decimal)
- A59661 (decimal)
- N59662 (decimal)
- A59662 (decimal)
- N59663 (decimal)
- A59663 (decimal)
- N59664 (decimal)
- A59664 (decimal)
- N59720 (decimal)
- A59720 (decimal)
- N11070 (decimal)
- A11070 (decimal)
- N10960 (decimal)
- A10960 (decimal)
- N11560 (decimal)
- A11560 (decimal)
- N06500 (decimal)
- A06500 (decimal)
- N10300 (decimal)
- A10300 (decimal)
- N85530 (decimal)
- A85530 (decimal)
- N85300 (decimal)
- A85300 (decimal)
- N11901 (decimal)
- A11901 (decimal)
- N11900 (decimal)
- A11900 (decimal)
- N11902 (decimal)
- A11902 (decimal)
- N12000 (decimal)
- A12000 (decimal)