It sounds like a great problem to have.

Someone hands you half a million dollars and challenges you to make it last as long as you can.

How long do you think you could live off of $500,000? A large part of it depends on where you are.

Get our free mobile app

The wealth planning experts at GOBankingRates started with that figure for a typical retirement nest egg and then factored in expenses like groceries, housing, utilities, transportation, and health care—for people ages 65 and older in all 50 states.

So how did South Dakota stack up to the $500k challenge?

Residents of the Mount Rushmore State could expect to milk that money for just a little more than a decade - ten years, four months, and 29 days to be exact.

Ten states were better.

STATES WHERE $500k LASTS LONGEST (GOBankingRates.com)

  1. Mississippi - 12 years, 3 months, 18 days
  2. Kansas - 11 years, 11 months, 20 days
  3. Oklahoma - 11 years, 11 months, 1 day
  4. Arkansas - 11 years, 9 months, 18 days
  5. Alabama - 11 years, 7 months, 25 days
  6. New Mexico - 11 years, 7 months, 21 days
  7. Georgia - 11 years, 7 months, 3 days (tie)
  8. Tennessee - 11 years, 7 months, 3 days (tie)
  9. Indiana - 11 years, 6 months, 26 days
  10. Michigan - 11 years, 5 months, 20 days
  11. South Dakota - 10 years, 4 months, 29 days 

Not surprisingly, your head earned retirement money will drain from your account at breakneck speed in three of the most expensive states in America - Hawaii, New York, and California, where you'll hit zero in your bank account a full three years, or sooner, than in South Dakota.

STATES WHERE $500k GOES QUICKEST (GOBankingRates.com)

  1. Hawaii - 5 years, 2 months, 24 days
  2. New York - 7 years, 1 month, 1 day
  3. California - 7 years, 3 months, 19 days
  4. Oregon - 7 years, 9 months, 7 days
  5. Massachusetts - 7 years, 11 months, 30 days
  6. Alaska - 8 years 1 month, 27 days
  7. Maryland - 8 years, 2 months, 27 days
  8. Connecticut - 8 years, 5 months, 12 days
  9. Rhode Island - 8 years, 8 months, 8 days
  10. New Jersey - 8 years, 10 months, 23 days

KEEP READING: Here are the best places to retire in America