Editor's Note: This article is the first in a series on what advisors think the minimum cost is to retire in certain U.S. locations. Look for other articles in coming weeks.

"It’s no secret that the City by the Bay is one of the most expensive places to live in America," said Kimberly Foss, founder and president of Empyrion Wealth Management in Roseville, Calif.

Whether it's because of its natural beauty or its proximity to the high-tech billionaires of Silicon Valley, the median home there goes for more than $1.3 million, as measured by the real estate website Zillow. That's an increase of 10.7 percent over the past year, and it's expected to rise another 7.4 percent in the year ahead. (Compare that to some $216,000 nationally.)

For renters, the numbers aren't much more encouraging. The average one-bedroom apartment in San Francisco rents for $3,334 a month, while a two-bedroom goes for $4,509, as measured by RentJungle.com. Nationally, the numbers are $1,271 and $1,489, respectively.

"Housing costs in San Francisco can be as high as 30 percent to 50 percent of an individual’s take-home pay, making the need for higher and more consistent retirement income essential," said Joe Lum, a wealth advisor at Intersect Capital, in San Ramon, Calif.

Besides housing, everyday items are unusually pricey, too. "A gallon of milk averages $5, which is about 30 percent higher than the national average," said Foss. Altogether, she noted, "Basic annual costs of living -- housing, medical care including Medicare premiums, food, transportation, and a modest entertainment budget -- average about $75,600."

Given than, what sort of portfolio would a retiree need to live comfortably in San Francisco? "A single person aged 65 who is in good health would probably need a portfolio in the neighborhood of $800,000 to $1 million to even consider retiring to San Francisco," Foss said.

That's at a bare minimum, and assuming good health throughout retirement. Foss' calculations are based on an annual average rate of return of 5 percent. "If a retiree wanted to live only on the interest and other income generated by their portfolio, they would need to have about $1.5 million in total assets," she said.

Retirees who live longer than average would need more or risk outliving their money, she cautioned.

More certainly wouldn't hurt. "By most standards, a married couple would require a net worth of $4 million and up to retire within the city limits of San Francisco," said Lum. He would urge such clients to focus on "managing expenses, minimizing taxes and creating a diversified investment plan."