Maine has the highest median age of any state in the country: 45 years. That’s two years more than retiree magnet Florida and fully 13 years more than Utah, the state with the lowest median age (32 years).

Why the big gap? Economics and religion. In Maine, jobs are fewer and wages are lower, so young people tend to leave in search of opportunities elsewhere. Mormonism is Utah’s dominant religious tradition, which prizes community—and large families. That makes Utah an outlier within the U.S., but very close to the global median age of 31 years.

Visual Capitalist

What all states share, though, is that their median age is creeping upward. North Dakota used to be an exception. Its median age dropped from 37 in 2010 to 35.2 in 2018, making it the only state that got younger over that period. But even the continued influx of a relatively younger workforce, attracted by the state’s thriving energy industry, hasn’t been able to maintain the trend: By 2022, the median age had crept up again to 36 years.

(“Median,” by the way, refers to the middle of a range of values, while “average” is the sum of all values divided by their number. The median is seen as a more robust measure of distribution because the average is often skewed by outliers with extreme values.)

This article originally appeared on Big Think, home of the brightest minds and biggest ideas of all time. Sign up for Big Think’s newsletter.