Business and local markets
ZIP business growth, tax filers and income: a 2018–2023 comparison
ZIP codes with faster growth in business locations tended to add more tax returns. Their growth in average income per return was only modestly higher. Combining the two histories helps separate growth in the number of tax returns from growth in income per return.
Census ZIP Business Patterns and IRS income-tax records · Historical comparison · Free inputs, results and code
More locations, more returns; a smaller difference in income growth
A ZIP with more businesses may be attracting more customers. It may also be serving a population whose income is changing. Those are different questions, and a business count alone cannot answer both.
We joined all-industry employer establishment counts from Census with IRS tax-return counts and adjusted gross income (AGI), using 2018 and 2023 as the common endpoints. The main comparison contains 12,649 ZIP codes with at least 100 business locations and 1,000 returns in 2018. An establishment is a business location with paid employees; one company can operate several. Returns are tax filings, not a count of people.
Among ZIPs where business-location counts grew at least 25%, the median increase in returns was 17.2%. In ZIPs with business growth from zero to under 10%, it was 2.2%. The corresponding increases in mean AGI per return were much closer: 27.6% versus 25.1%. These income changes are in nominal dollars, without an inflation adjustment.
| Business-location growth | ZIPs | Tax returns | Mean AGI per return |
|---|---|---|---|
| Declined | 3,676 | +0.4% | +23.8% |
| 0% to under 10% | 5,476 | +2.2% | +25.1% |
| 10% to under 25% | 2,683 | +6.2% | +26.7% |
| 25% or more | 814 | +17.2% | +27.6% |
The scatterplots show the variation hidden by those medians. Across the same ZIPs, the rank correlation between business growth and return growth is 0.47; with mean-income growth it is 0.18. Rank correlation describes whether ZIPs tend to move together in the ordering, on a scale from −1 to +1. Neither relationship establishes cause or predicts an individual business’s sales.
What the distinction looks like in three ZIPs
Consider two Cary postal ZIPs near our North Carolina base. In 27519, business locations grew 40.6% and returns grew 16.0%. In 27513, locations grew 8.1% while returns fell 0.5%. Yet their mean-income increases were similar: 25.4% and 24.5%.
| ZIP / postal city | Business locations | Tax returns | Mean AGI per return |
|---|---|---|---|
| 27513 / CARY | +8.1% | -0.5% | +24.5% |
| 27519 / CARY | +40.6% | +16.0% | +25.4% |
| 27601 / RALEIGH | +10.2% | -7.3% | +41.3% |
Raleigh’s 27601 offers another combination: mean AGI rose 41.3% while the number of returns fell 7.3%. That does not establish that the same residents became wealthier. A ZIP’s mix of filers can change, and unusually large incomes can move the average.
These three local examples were selected after the national calculation to illustrate different combinations. They are not a representative sample or a list of recommended markets. Postal city labels do not define municipal boundaries.
For a territory review, put your own sales or service counts beside these measures. A rise in sales alongside a rise in tax returns suggests a different follow-up question from a rise in sales while the return count contracts. The public data supplies context for that investigation; it does not measure your customers, competitors or addressable demand.
Download all 26,710 comparable ZIP results · Check coverage for all 36,222 ZIPs. Keep ZIP codes as text when importing into Excel so leading zeroes survive. The main_sample field identifies the 12,649 ZIPs used in the charts; smaller eligible ZIPs remain in the results.
Two histories, joined on the postal ZIP code
The ZIP Code Business & Industry History, 2017–2023 supplies the employer-location counts. We use its zip_totals.csv, not a sum of overlapping industry categories. The full product also supports industry and establishment-size comparisons over time.
The ZIP Code Income & Tax History, 2018–2023 supplies return counts and aggregate AGI from zip_history.csv. Dividing aggregate AGI by returns gives mean AGI per return. Both products use native postal ZIPs, so this comparison needs no ZIP-to-ZCTA crosswalk.
The products cost $29 and $29 once, sold separately ($58 combined). They provide the longer histories, additional fields, source references and checked coverage for other comparisons. The free excerpts below reproduce this entire article. Census and IRS also provide the original files free; the purchase pays for preparation, documentation and validation.
Business-history guide · Income-history guide · More ZIP-based market data
Code example
Download the two input files into the same folder as your notebook. business_endpoints.csv contains 70,196 genuine 2018/2023 business records. income_endpoints.csv contains 55,247 genuine income records for those years. They retain the original selected fields, statuses and source-row references from the paid files; no observations are invented.
Run the code below in Python 3.10 or later, as a notebook cell or script. It uses the standard library, prints the four group summaries and writes results into results/. You can call main() again without command-line arguments.
"""Compare ZIP business locations and tax-filer income, 2018–2023.
Save business_endpoints.csv and income_endpoints.csv beside your notebook.
The complete purchased zip_totals.csv and zip_history.csv also work.
Only Python's standard library is required. ZIP codes stay text.
"""
import csv
import json
import math
import re
from collections import Counter
from pathlib import Path
from statistics import median
YEARS = ("2018", "2023")
STATES = set("AL AK AZ AR CA CO CT DE DC FL GA HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY".split())
GROUPS = ("Declined", "0% to under 10%", "10% to under 25%", "25% or more")
METRICS = ("establishment_change_pct", "return_change_pct", "mean_agi_change_pct", "total_agi_change_pct")
def read_endpoints(path, year_column):
rows = {}
with open(path, newline="", encoding="utf-8-sig") as stream:
for row in csv.DictReader(stream):
if row[year_column] not in YEARS:
continue
z = row["zip_code"]
if not re.fullmatch(r"[0-9]{5}", z) or z in {"00000", "99999"}:
raise ValueError("Expected a five-character postal ZIP: " + z)
if row["geography_status"] != "postal_zip":
raise ValueError("Unexpected geography: " + z)
key = (z, row[year_column])
if key in rows:
raise ValueError("Duplicate ZIP/year: " + str(key))
rows[key] = row
return rows
def integer(value):
if not re.fullmatch(r"-?[0-9]+", value):
raise ValueError("Expected an integer source value: " + repr(value))
return int(value)
def growth(start, end):
return 100 * (end / start - 1)
def group(start, end):
# Integer comparisons preserve exact 0%, 10% and 25% boundaries.
if end < start:
return GROUPS[0]
if 10 * end < 11 * start:
return GROUPS[1]
if 4 * end < 5 * start:
return GROUPS[2]
return GROUPS[3]
def compare(business, income):
results, coverage = [], []
for z in sorted({key[0] for key in business} | {key[0] for key in income}):
reasons, b, t = [], {}, {}
for year in YEARS:
b[year], t[year] = business.get((z, year)), income.get((z, year))
if b[year] is None:
reasons.append("missing_business_" + year)
if t[year] is None:
reasons.append("missing_income_" + year)
states = {r["source_state_abbr"] for r in b.values() if r}
states |= {r["state_abbr"] for r in t.values() if r}
if len(states) > 1:
reasons.append("state_label_mismatch")
if not states <= STATES:
reasons.append("outside_50_states_dc")
values = {}
for year in YEARS:
if b[year]:
e = integer(b[year]["establishments"])
if e < 0:
raise ValueError("Negative establishment count: " + z)
if year == YEARS[0] and e == 0:
reasons.append("zero_baseline_establishments")
values["establishments_" + year] = e
if t[year]:
for field in ("returns", "agi_thousands_usd"):
status, value = t[year][field + "_status"], t[year][field]
if status not in {"published", "published_zero_not_proof_of_absence",
"combined_or_withheld", "source_conflict_review_required",
"source_dot_unavailable", "not_in_source_edition"}:
raise ValueError("Unknown source status: " + status)
if status not in {"published", "published_zero_not_proof_of_absence"}:
if value:
raise ValueError("Unavailable source value is not blank")
reasons.append(field + "_" + status + "_" + year)
continue
n = integer(value)
if field == "returns" and n < 0:
raise ValueError("Negative return count: " + z)
if (n == 0) != (status == "published_zero_not_proof_of_absence"):
raise ValueError("Source value/status disagree")
if n <= 0:
reasons.append("nonpositive_" + field + "_" + year)
values[field + "_" + year] = n
main = not reasons and values["establishments_2018"] >= 100 and values["returns_2018"] >= 1000
coverage.append({"zip_code": z, "state_labels": ";".join(sorted(states)),
"comparison_status": "excluded" if reasons else "included",
"main_sample": "yes" if main else "no",
"reasons": ";".join(reasons) if reasons else "" if main else "below_baseline_size_threshold"})
if reasons:
continue
r = {"zip_code": z, "state_abbr": next(iter(states)),
"source_city_2023": b["2023"]["source_city"], **values}
for year in YEARS:
r["mean_agi_" + year + "_usd"] = 1000 * values["agi_thousands_usd_" + year] / values["returns_" + year]
r.update(establishment_change_pct=growth(values["establishments_2018"], values["establishments_2023"]),
return_change_pct=growth(values["returns_2018"], values["returns_2023"]),
mean_agi_change_pct=growth(r["mean_agi_2018_usd"], r["mean_agi_2023_usd"]),
total_agi_change_pct=growth(values["agi_thousands_usd_2018"], values["agi_thousands_usd_2023"]),
establishment_growth_group=group(values["establishments_2018"], values["establishments_2023"]),
main_sample="yes" if main else "no")
results.append(r)
return results, coverage
def ranks(values):
order = sorted(range(len(values)), key=values.__getitem__)
result, i = [0.0] * len(values), 0
while i < len(order):
j = i + 1
while j < len(order) and values[order[j]] == values[order[i]]:
j += 1
for k in order[i:j]:
result[k] = (i + 1 + j) / 2
i = j
return result
def correlation(x, y):
if len(x) < 2:
return None
xm, ym = sum(x) / len(x), sum(y) / len(y)
xx, yy = sum((v - xm) ** 2 for v in x), sum((v - ym) ** 2 for v in y)
return sum((a - xm) * (b - ym) for a, b in zip(x, y)) / math.sqrt(xx * yy) if xx and yy else None
def summarize(rows, minimum_establishments=100, minimum_returns=1000):
selected = [r for r in rows if r["establishments_2018"] >= minimum_establishments and r["returns_2018"] >= minimum_returns]
summary = {"minimum_establishments_2018": minimum_establishments,
"minimum_returns_2018": minimum_returns, "zip_codes": len(selected), "groups": []}
for name in GROUPS:
members = [r for r in selected if r["establishment_growth_group"] == name]
summary["groups"].append({"group": name, "zip_codes": len(members),
**{field: median(r[field] for r in members) if members else None for field in METRICS}})
x = [r["establishment_change_pct"] for r in selected]
for field in METRICS[1:3]:
y = [r[field] for r in selected]
summary[field + "_pearson"] = correlation(x, y)
summary[field + "_spearman"] = correlation(ranks(x), ranks(y))
return summary
def write_csv(path, rows):
if not rows:
raise ValueError("No rows to write")
with open(path, "w", newline="", encoding="utf-8") as stream:
writer = csv.DictWriter(stream, fieldnames=list(rows[0]), lineterminator="\n")
writer.writeheader()
for row in rows:
writer.writerow({k: format(v, ".8f") if isinstance(v, float) else v for k, v in row.items()})
def main(business_path="business_endpoints.csv", income_path="income_endpoints.csv", output_dir="results"):
rows, coverage = compare(read_endpoints(business_path, "year"), read_endpoints(income_path, "tax_year"))
output = Path(output_dir)
output.mkdir(parents=True, exist_ok=True)
write_csv(output / "zip_comparison.csv", rows)
write_csv(output / "coverage.csv", coverage)
sensitivity = [summarize(rows, e, n) for e, n in [(100, 1000), (50, 500), (250, 2500), (1, 1)]]
summary = {"years": YEARS, "universe": len(coverage), "comparable_zip_codes": len(rows),
"main": sensitivity[0], "sensitivity": sensitivity[1:],
"exclusion_reasons": dict(sorted(Counter(reason for r in coverage if r["comparison_status"] == "excluded" for reason in r["reasons"].split(";")).items()))}
(output / "summary.json").write_text(json.dumps(summary, indent=2, allow_nan=False) + "\n")
print(f"{len(rows):,} comparable ZIP codes; {summary['main']['zip_codes']:,} meet the baseline size thresholds.")
for g in summary["main"]["groups"]:
print(f"{g['group']}: {g['zip_codes']:,} ZIPs; median return change {g['return_change_pct']:.1f}%; median nominal mean-AGI change {g['mean_agi_change_pct']:.1f}%")
return rows, coverage, summary
if __name__ == "__main__":
main()
With the full purchased files, call main('zip_totals.csv', 'zip_history.csv'). Those files produce identical results. This example fixes the endpoints at 2018 and 2023; a different period requires reviewing the year-specific fields, eligibility and source comparability.
The summary contains medians and correlations under every threshold. To regenerate the figures, save the chart code beside the results/ folder and run it with matplotlib 3.10.9. The source manifest, analysis plan and verification record document the pinned editions and checks.
Method, coverage and limitations
The starting universe is the union of genuine postal ZIPs appearing in either source at either endpoint: 36,222 codes. We require all four records, consistent state labels in the 50 states or DC, a positive starting establishment count, and reported positive returns and AGI at both dates. This leaves 26,710 comparable ZIPs. Of those, 14,061 fall below the main comparison’s baseline size thresholds.
The remaining 9,512 ZIPs are excluded from the comparison. Most lack an income endpoint. The prepared income edition also flags 146 conflicting 2018 AGI cells and 145 conflicting return-count cells in the original IRS CSV/workbook sources. These values remain unavailable. The coverage file records every reason; reason counts overlap and must not be added as distinct ZIPs. Missing or withheld values are never treated as zero.
We calculate percentage change as 100 × (2023 value / 2018 value − 1). Mean AGI is 1,000 × AGI in thousands of dollars / returns, using the unrounded source totals. Each ZIP has equal weight in group medians and correlations. These are not population-weighted national estimates. Group boundaries and baseline thresholds were specified before calculating results.
The conclusion is similar with stricter or looser size thresholds: business growth has a stronger association with return growth than with mean-AGI growth. Including all eligible small ZIPs weakens both relationships.
| 2018 minimum: locations / returns | ZIPs | Business vs. return growth | Business vs. mean-AGI growth |
|---|---|---|---|
| 100 / 1,000 | 12,649 | 0.47 | 0.18 |
| 50 / 500 | 15,948 | 0.45 | 0.15 |
| 250 / 2,500 | 8,619 | 0.45 | 0.21 |
| 1 / 1 | 26,710 | 0.29 | 0.11 |
- Geography can change. The same five-digit code does not guarantee unchanged postal boundaries or the same addresses in both years. This is not a constant-boundary panel or a ZIP+4 analysis.
- The populations differ. Employer locations describe business activity; income-tax records describe filers using a ZIP. They do not identify who shops or works at those businesses. A change in location counts is not a count of openings minus closures.
- Income needs interpretation. Mean AGI is neither median household income nor consumer spending. It includes taxable income sources beyond wages and can be sensitive to large incomes, changing filers and tax definitions. No inflation adjustment is made.
- The period is historical. The endpoints span 2018–2023, including the pandemic. They do not describe current 2026 conditions, the intervening path, or what caused a change.
Verification covered exact customer-archive hashes, identical free/full-file outputs, independently recalculated measures and group summaries, and every selected record against the original Census files and 102 IRS state workbooks plus their national CSVs. The analysis retains the source’s conflicts and unavailable values.
Original sources and editions
- Census County and ZIP Business Patterns files and methodology; 2018 and 2023 all-industry postal-ZIP totals from the pinned 2017–2023 product.
- IRS SOI 2018 and 2023 ZIP income-tax files, from the 2018–2023 edition retained November 29, 2026. Capture date and tax year are different.
Need a different comparison or a file matched to your territories? Ask about a custom dataset or contact Ben and Hugh.