When you’re try to gauge how much you need to save for a comfortable retirement, a million dollars probably sounds like a pretty reasonable number to shoot for.

But will a million dollars fund your retirement well into your dotage—or just over a decade?

One major factor in how long your money lasts, of course, is your lifestyle: If you’ve got a taste for cruises and caviar, you’ll need to save a lot more than someone who is perfectly content with road trips and ramen.

But where you live is a crucial element too.

The website GOBankingRates calculated how long $1 million would last you in every state, taking into account what the average person 65 and older spends on groceries, housing, utilities, transportation, and healthcare each year. They then factored in the cost of living for each state to assume an average annual budget for a retiree.

GOBankingRates did not, however, take into account a retirees’ earnings from Social Security, a major factor in their total income. A 67-year-old retiree today would get, on average, $34,334 per year from Social Security, which means that their theoretical $1 million in savings could potentially be spread over many more years.

Where your money lasts longest

If you want your savings to stretch, there’s no question that you should get away from the east or west coast. The biggest reason: cheaper housing.

As GOBankingRates notes: “Of the five states with costs under $12,000 a year for housing, four are among the top six states for low costs.” That includes winner Mississippi, where $1 million lasts just shy of 26 years.

While housing is just a bit pricier in fourth-ranked Arkansas—$12,232 per year—transportation and healthcare costs are among the lowest in the country.

Overall rank
(1=lowest cost)
StateHow long $1 million lasts
1Mississippi25 years, 11 months, 30 days
2Oklahoma24 years, 8 months, 24 days
3Michigan24 years, 7 months, 14 days
4
Arkansas24 years, 7 months, 4 days
5Alabama24 years, 7 months, 4 days

Where you’ll run out fastest

If you want to spend your retirement next to an ocean, be prepared to pay.

Three of the states where that million-dollar savings will drain quickly—Hawaii, California, and New York— are also well-known for their uber-high housing prices.

A valid email is required

Hawaii, however, is also the most expensive state in the nation for groceries, which means you can easily blow through a million bucks in not much more than a decade.

Overall rank
(50=highest cost)
StateHow long $1 million lasts
50Hawaii11 years, 8 months, 20 days
49California15 years, 5 months, 27 days
48New York16 years, 3 months, 22 days
47Alaska16 years, 8 months, 6 days
46Maryland16 years, 8 months, 29 days

You can see how your state stacks up against others in the map below:

How long $1 million lasts

Data from GOBankingRates

Watch this

5 places you can retire and live the luxe life on a budget