Financial experts typically recommend $1 million as the gold standard for retirement savings. But in some cities, that amount doesn't stretch as far as you might hope.

To determine how long a $1 million retirement fund would last, personal-finance website SmartAsset looked at average expenses for seniors, including food, health care, transportation, housing and utilities, cost of living and investment returns in major U.S. cities.

The site used data from the Bureau of Labor Statistics and the nonprofit Council for Community and Economic Research to calculate how many years a $1 million portfolio would cover in each place, including any investment returns earned.

Unsurprisingly, New York City and San Francisco topped the list. Both places are notorious for their steep housing expenses and high cost of living. However, in places like Memphis, Tennessee, and McAllen, Texas, residents can expect $1 million in retirement savings to last close to three decades.

Here's a closer look at the 10 U.S. cities where a $1 million retirement fund would run out the quickest.