Saving $1 million for retirement is an oft-cited bit of conventional wisdom, but how long will that tidy sum last?

The answer depends on where retirees live. The cost of retirement varies wildly from state to state.

A $1 million nest egg will last longest in Mississippi — 23 years, one month and 16 days. Your million bucks disappears most quickly in Hawaii at just 10 years, three months and 27 days, said the study by GoBankingRates, an online financial services site.

The study used an average retirement age of 63 and an average life expectancy of 79, then calculated states by cost-of-living expenditures for housing, transportation, health care, groceries and utilities.

Behind Hawaii came California, where $1 million would last 13 years, one month and 15 days, and New York, where it would be depleted in 14 years, three months and 25 days.

What makes those states so pricey? Housing costs.

What makes those states so pricey? Housing costs that average more than $53,000 a year in Hawaii, more than $36,000 in California, and more than $32,000 in New York.

Filling out the top 10, expense-wise, were Oregon, Massachusetts, Alaska, Maryland, Connecticut, New Jersey, and Rhode Island, all thanks to high costs of housing, health care or groceries.

That $1 million goes furthest in Mississippi thanks mostly to housing that costs about a third less than the national average.

Next up was Arkansas, where $1 million will last 22 years, 10 months and 30 days; Oklahoma at 22 years, 10 months and 21 days; Missouri at 22 years, 10 months and 11 days; and New Mexico at 22 years, nine months and four days.

On average in America, that nest egg will last 19 years, seven months and six days, which roughly matches numbers in Pennsylvania and Minnesota.

Smack in the middle at No. 25 on the list of states was Wisconsin, where $1 million in retirement savings would last 20 years, five months and 18 days.

On average in America, that nest egg will last 19 years, seven months and six days, which roughly matches numbers in Pennsylvania and Minnesota.

Other recent studies of retirement expenses have come up with differing results, such as one by personal finance site Bankrate that calculated in such factors as crime and culture along with costs.

It named New York, California and New Jersey as the most expensive states for retirement. Michigan, Missouri and Indiana scored the least expensive.

“Where to live is probably one of the most personal decisions one can make because it’s not just about preferences, it’s also about the financial considerations that are associated with it,” said Mark Hamrick, senior economic analyst at Bankrate.