Maryland county FIPS codes
Every Maryland county FIPS code with name, type, area, centre point and ZIP count, as CSV, Excel or JSON. Updated 19 November 2026.
Maryland counties and FIPS codes
Maryland has state FIPS code 24, and this list has 24 counties and county equivalents: 23 counties and 1 independent city. Each full FIPS code joins the state code and a three-digit county code, so Allegany County is 24001: 24 for Maryland and 001 for the county.
By area the largest is Frederick at about 1,718 km² (663 sq mi) and the smallest is Baltimore at about 213 km² (82 sq mi); the counties add up to about 25,486 km². Montgomery has the most ZIP codes assigned to it (76).
Maryland has an independent city that is its own county equivalent: Baltimore city (24510).
All 24 counties
| FIPS | Name | Type | Area km² | Latitude | Longitude | ZIP codes |
|---|---|---|---|---|---|---|
| 24001 | Allegany County | County | 1,083 | 39.629618 | -78.641143 | 22 |
| 24003 | Anne Arundel County | County | 1,106 | 39.094625 | -76.66694 | 43 |
| 24005 | Baltimore County | County | 1,566 | 39.521216 | -76.688887 | 53 |
| 24009 | Calvert County | County | 553 | 38.578683 | -76.586433 | 14 |
| 24011 | Caroline County | County | 839 | 38.893355 | -75.828853 | 11 |
| 24013 | Carroll County | County | 1,173 | 39.570929 | -76.990912 | 13 |
| 24015 | Cecil County | County | 884 | 39.638971 | -76.038738 | 17 |
| 24017 | Charles County | County | 1,221 | 38.523898 | -76.911607 | 24 |
| 24019 | Dorchester County | County | 1,447 | 38.45906 | -76.04665 | 16 |
| 24021 | Frederick County | County | 1,718 | 39.453431 | -77.401654 | 31 |
| 24023 | Garrett County | County | 1,685 | 39.528458 | -79.296448 | 9 |
| 24025 | Harford County | County | 1,153 | 39.585199 | -76.312728 | 21 |
| 24027 | Howard County | County | 657 | 39.239318 | -76.914713 | 22 |
| 24029 | Kent County | County | 751 | 39.279545 | -76.07918 | 9 |
| 24031 | Montgomery County | County | 1,273 | 39.139854 | -77.167664 | 76 |
| 24033 | Prince George's County | County | 1,261 | 38.800567 | -76.831213 | 64 |
| 24035 | Queen Anne's County | County | 956 | 39.084283 | -75.979087 | 13 |
| 24037 | Saint Mary's County | County | 976 | 38.33741 | -76.674113 | 29 |
| 24039 | Somerset County | County | 817 | 38.17025 | -75.671407 | 11 |
| 24041 | Talbot County | County | 737 | 38.83617 | -76.032046 | 15 |
| 24043 | Washington County | County | 1,154 | 39.602992 | -77.719956 | 23 |
| 24045 | Wicomico County | County | 993 | 38.368016 | -75.598699 | 18 |
| 24047 | Worcester County | County | 1,270 | 38.168356 | -75.435078 | 12 |
| 24510 | Baltimore | City | 213 | 39.316977 | -76.616437 | 39 |
No row matches. Clear the filter to see all.
File: maryland-county-fips-codes.csv
Using FIPS codes
FIPS codes are the join key for most US county data, from Census population tables to election results and BLS unemployment files. Store them as five-character text even though Maryland's codes start with 2: codes in states such as Alabama (01) and California (06) start with 0, and a number column drops that zero as soon as you combine states.
-- add county names to any table that has a 5-digit fips column
SELECT d.*, c.name AS county_name
FROM my_data d
LEFT JOIN county_fips c ON c.fips = d.fips
WHERE c.state = 'MD';In Excel, build the 5-digit code from two parts with =TEXT(A2,"00")&TEXT(B2,"000"), where A2 is the state code (24) and B2 the county code.
Where the data comes from
Names, types, areas and centre points come from Natural Earth's 1:10m admin-2 counties (version 5.1.1, public domain). We checked every FIPS code against the GeoNames admin-2 list: 24 of 24 match. ZIP counts come from the GeoNames postal code file on the Maryland ZIP code page.
Data dictionary
| Column | Type | Meaning |
|---|---|---|
| fips | text | Five-digit county FIPS code |
| state_fips | text | Two-digit state FIPS code |
| county_fips | text | Three-digit county code within the state |
| name | text | Short name |
| full_name | text | Name with its type, e.g. 'Kent County' |
| type | text | County, Parish, Borough, City, Census Area, Planning Region… |
| state | text | Two-letter state code |
| state_name | text | State name |
| area_sq_km | number | Area in km² (Natural Earth; rounded) |
| latitude | number | Centre point latitude (Natural Earth) |
| longitude | number | Centre point longitude (Natural Earth) |
| zip_codes | number | ZIP codes assigned to it in the GeoNames postal list |
| wikidata_id | text | Wikidata item, for linking to other data |