IRSTaxes: IRS Federal Tax Return Data Summaries for States, Counties and ZIP Codes

Updated January 2024

This collection comprises aggregated summaries of U.S. federal tax returns (Form 1040, et. al.) for specific tax years and geographic areas. The data source is the IRS web site (county-level and ZIP-level data).

What Data are Reported

The returns[yy] datasets cover the entire U.S. These datasets include return counts and dollar amounts (in thousands) for all tax returns regardless of adjusted gross income (AGI) level, along with details for six or eight AGI levels, described below. These datasets use variable names defined in the corresponding technical documentation (available as Word documents in this data directory.)

The variable names in these datasets conform to the tech docs but are not very mnemonic. N1 is the variable for total number of returns; N00200 and A00200 are the number and aggregate dollar amount (in thousands) of the salaries and wages line on the returns. In other words, N00200 tells us how many of the total (N1) returns reported having some salary and wage income, whereas A00200 tells us the aggregate total of those reported values. Most of the non-ID variables on these datasets are in the form Nnnnnn and Annnnn, where nnnnn is a five-digit line item code. We have labeled each of the variables on these datasets, e.g., the label for variable A00300 is "Taxable Interest Amt".

Enhanced Versions of Original Data Sets

Although the data as downloaded provide the basic information needed to do interesting analyses, the numbers as reported are not very meaningful per se. An aggregate amount of total dollars reported in a category is really not that useful when trying to see what it means or how it compares to other geographic areas. Likewise, the N values (indicating how many returns reported a particular item) are not all that informative in isolation.

These raw values would be more useful if they came with means (of the amounts reported) and percentages (of total returns). For example, instead of just the total of social security income reported and the number of returns that reported such income, we would also get the average dollar amount of social security received (just for the returns reporting it) and the percentage of all returns reporting such income.

It would also be helpful if the variable (field) names were more meaningful — e.g., "AGI" instead of "A00100". This is why we created a parallel set of "enhanced" datasets, one for each tax year. These enhanced datasets include the word "plus" in their names.

Geographies

These datasets include states, counties, and ZIP codes. The sumlev variable can be used to filter on a particular geography type. A sumlev value of 040 indicates a state summary; 050 indicates counties, and 871 indicates ZIPs within states. Note that the IRS refuses to deal with ZIP codes that cross state lines. That should not be too significant, since there are very few addresses where this occurs.

Adjusted Gross Income (AGI) Level Summaries

The raw data from the IRS includes both totals for all adjusted gross income (AGI) levels, as well as details for six (for ZIP codes) or eight (for states and counties) AGI levels. The AGI class code is stored in the agi_stub variable, and the description of the AGI level is stored in the agi variable.

State and county AGI levels:

  • 0: Total
  • 1: Under $1
  • 2: $1 < $10k
  • 3: $10k < $25k
  • 4: $25k < $50k
  • 5: $50k < $75k
  • 6: $75k < $100k
  • 7: $100k < $200k
  • 8: $200k or more

ZIP code AGI levels:

  • 0: Total
  • 1: Under $25k
  • 2: $25k < $50k
  • 3: $50k < $75k
  • 4: $75k < $100k
  • 5: $100k < $200k
  • 6: $200k or more

Getting Data for Just Your State

All these data sets include data for the entire country, but it's easy to create state-based subsets. The key is knowing the state FIPS code(s) and using the filter in Section II of the Dexter query form. State FIPS codes are available from many sources, such as MCDC's geographic codes lookup for the United States or Wikipedia. Use the appropriate FIPS code(s) in Section II of the Dexter query form as follows:

Or, for those who just need data for a single state (like Missouri) you could use:

More Data for More Years

The IRS Statistics of Income (SOI) division publishes a wide array of data and reports related to taxes. Of specific interest to users of these irstaxes data is their SOI Tax Stats - Products, Publications, and Papers page, which includes a section title Data Products. The County Income Data and ZIP Code Data links in this section take you to pages where you can access the irstaxes data for multiple years. They have these data going back to tax year 2001. The data are provided as sets of state-based collections of Excel files.