US Census Data

ZIP 02538 vs ZIP 02540

A side-by-side comparison of ZIP Code 02538 and ZIP Code 02540: population, income, housing, and more.

ZIP 02538 and ZIP 02540 are ZIP Code areas in Massachusetts. This page compares them across population, income, housing, education, commuting, and how each has changed since 2019.

ZIP 02540 has the higher population (8,354 vs 4,556 in ZIP 02538). ZIP 02538 has the higher median household income ($110,882 vs $88,266 in ZIP 02540). ZIP 02540 has the higher median home value ($756,300 vs $347,300 in ZIP 02538).

Population, income & housing

ZIP 02538ZIP 02540
Population4,5568,354
Median age40.1 yrs62.4 yrs
Median household income$110,882$88,266
Median home value$347,300$756,300
Median gross rent$1,548$1,328
Housing units1,8256,200
Homeownership rate75.2%65.7%
Bachelor's degree or higher22.4%58.7%
Unemployment rate3.0%5.1%

Trends (ACS 5-year, 2019–2023)

ZIP 02538ZIP 02540
Population4,128 → 4,556 (+10.4%)8,346 → 8,354 (+0.1%)
Median household income$69,327 → $110,882 (+59.9%)$78,603 → $88,266 (+12.3%)
Median home value$263,300 → $347,300 (+31.9%)$599,200 → $756,300 (+26.2%)
Median gross rent$1,293 → $1,548 (+19.7%)$1,015 → $1,328 (+30.8%)

ZIP 02538

Population
4,1284,556
Median household income
$69,327$110,882
Median home value
$263,300$347,300
Median gross rent
$1,293$1,548

ZIP 02540

Population
8,3468,354
Median household income
$78,603$88,266
Median home value
$599,200$756,300
Median gross rent
$1,015$1,328

Age & race/ethnicity

Age distribution (share)

ZIP 02538ZIP 02540
Under 54.9%2.0%
5 to 1712.4%9.5%
18 to 247.7%4.7%
25 to 3417.1%8.8%
35 to 4411.6%5.6%
45 to 5413.4%8.0%
55 to 6415.1%18.3%
65 to 749.0%20.4%
75 and over8.8%22.8%

Race & ethnicity (share)

ZIP 02538ZIP 02540
White (non-Hispanic)91.8%84.3%
Black or African American0.0%1.1%
American Indian & Alaska Native0.4%1.4%
Asian1.1%2.7%
Native Hawaiian & Pacific Islander0.0%0.0%
Some other race1.2%0.9%
Two or more races5.5%5.2%
Hispanic or Latino0.0%4.5%

Educational attainment (age 25+)

Share of adults 25+

ZIP 02538ZIP 02540
No high school diploma4.2%6.0%
High school graduate33.9%11.8%
Some college or associate's39.4%23.5%
Bachelor's degree16.0%27.5%
Graduate or professional degree6.4%31.2%

Commute to work

How workers get to work (share)

ZIP 02538ZIP 02540
Drove alone80.8%59.3%
Carpooled10.4%8.9%
Public transit0.0%2.2%
Walked0.0%3.6%
Bicycle0.0%2.8%
Worked from home7.2%22.5%
Other means1.6%0.7%

Housing

Units in structure (share)

ZIP 02538ZIP 02540
1-unit, detached81.2%64.5%
1-unit, attached3.9%8.8%
2 to 4 units0.0%12.7%
5 to 19 units5.0%3.4%
20 or more units0.0%10.6%
Mobile home & other9.9%0.0%

Poverty & households

ZIP 02538ZIP 02540
Poverty rate5.1%16.2%
Average household size2.631.96
Mean commute (minutes)3318
Median year structure built19681966

Full profiles

2