County FIPS Codes: How 5-Digit Codes Work
County FIPS codes are the workhorses of US geographic data. Understanding their structure unlocks every major federal dataset.
County FIPS codes are 5-digit numbers that uniquely identify every county and county-equivalent in the United States. There are 3,144 of them, covering counties, parishes (Louisiana), boroughs and census areas (Alaska), independent cities (Virginia), and the District of Columbia. Our county FIPS codes guide explains the full taxonomy.
The structure is straightforward: the first two digits are the state FIPS code, and the last three digits are the county's number within that state. King County, WA is 53-033. Los Angeles County, CA is 06-037. Harris County, TX (Houston) is 48-201. The county portion is always odd-numbered for historical reasons dating back to how codes were assigned — this leaves room to insert new counties without renumbering existing ones.
County FIPS codes are the most-used level of FIPS geography in federal data. The Census Bureau's American Community Survey, the BLS Quarterly Census of Employment and Wages, EPA air quality monitoring data, HUD Fair Market Rents, and USDA rural classifications all publish at the county level using 5-digit FIPS codes. Joining any two of these datasets requires nothing more than matching on this single field.
One common confusion: some datasets (especially older ones) store the state and county codes separately in two columns rather than as a single 5-digit code. To reconstruct the full FIPS, concatenate the state code (zero-padded to 2 digits) with the county code (zero-padded to 3 digits). In Python: fips = str(state).zfill(2) + str(county).zfill(3). Explore any county's full data profile using the FIPS search or by browsing from a state page.
More Articles
ACS 5-Year Estimates: Accessing Census Data by FIPS Code
The American Community Survey 5-year estimates are the gold standard for county-level demographic data. Here's how to access them using FIPS codes via the Census API.
Apr 15, 2026
Congressional Districts and FIPS: CD Codes Explained
Congressional district codes follow a different format than state and county FIPS codes. Here's how they work and where they appear in federal data.
Mar 24, 2026
How to Look Up Any FIPS Code in Seconds
Whether you have a county name, a state abbreviation, or a raw 5-digit number, here's the fastest way to find and decode any FIPS code.
Dec 6, 2025