How to convert ZIP code data to counties (or cities, or districts)
ZIP codes don't nest inside counties, cities or districts, so a ZIP-level count can't simply be moved to one county. Split it by population instead: Boundary Atlas gives, for every ZIP, the share of its 2020 residents in each county, city, town and congressional or legislative district. Multiply your ZIP counts by those shares and add them up by county.
Who this is for
- Analysts rolling up customer, sales or survey data
- Health departments and researchers with ZIP-level counts
- Insurers and marketers who need county or city totals
Ask your agent
With Boundary Atlas added to Claude, ChatGPT, Cursor or Codex (free, no key; how):
Here's a CSV of counts by ZIP code. Use Boundary Atlas to split each ZIP across counties by population share and give me totals by county.
Step by step
- Add Boundary Atlas to your agent. Claude, ChatGPT, Cursor or Codex: add the MCP endpoint (free, no key).
- Get the shares for each ZIP. related_geographies(id="us:zcta:<ZIP>", level="county") returns each county with weight = share of the ZIP's 2020 residents. Use level="place" for cities or "congressional_district" for districts.
- Multiply and sum. For each ZIP, multiply your count by each weight, then sum by county. Shares add to 1, so your total stays the same.
- Handle missing ZIPs. PO-box-only and single-building ZIPs have no ZCTA. Assign them by the post office's location, or report them separately.
Live example
ZIP 75052 (96,225 residents) is split across 2 counties. A count of 1,000 recorded for this ZIP splits like this:
| County | Share of ZIP residents | Of 1,000 |
|---|---|---|
| Dallas County | 59% | 592 |
| Tarrant County | 41% | 408 |
related_geographies(id="us:zcta:75052", level="county")
Things to know
- Population shares assume your data is spread like residents. Business addresses or rural service areas can differ.
- ZCTAs approximate USPS ZIP Codes and are fixed for the decade; USPS routes change monthly.
- Shares come from 2020 Census blocks.
Questions
Is this the same as the HUD-USPS ZIP crosswalk?
It answers the same question with a different base: HUD weights by addresses from USPS and updates quarterly; Boundary Atlas weights by 2020 Census population and also crosses to cities, towns, precincts and the 2026 districts, through an agent.
More guides
- How to find the congressional and state legislative districts for an address
- How to list the ZIP codes in a city, county or congressional district
- How to assign leads and accounts to sales territories by city, county or district
- How to map election results by precinct
- How to match members or supporters to their legislative districts
- How to make a map of your data by county, city or district
- How to tell whether an address is inside city limits
- How to find the federal riding and polling division for a place in Canada
- How to find who represents an address in Congress and the state legislature
- How to find a city's or county's official website and code of ordinances