Home sellers are making bank in today’s market, realizing an average profit of 24.1 percent, or $39,900, in 2016, according to a recent study.

Sellers on the West Coast—where home prices have skyrocketed since the recession—saw higher returns. Sellers in Oakland, California took home the highest profits at 78 percent, or $235,000.

Duration is key. The average seller turning a $39,900 profit, the analysis shows, held on to their home for seven years and five months. The average seller in Oakland hung on to their home for seven years and three months.

The top 10 markets:

CityMedian Years OwnedDollar Gain on SaleAnnual Dollar Gain on SalePercent Gain on Sale
Oakland, CA7 years,
3 months
Portland, OR9 years,
1 month
San Jose, CA9 years,
8 months
Denver, CO7 years,
7 months
Los Angeles, CA9 years,
8 months
Sacramento, CA6 years,
11 months
Seattle, WA9 years,
2 months
Philadelphia, PA7 years,
11 months
New Orleans, LA8 years,
7 months
Boston, MA7 years,
10 months


“The housing market can change a lot in 10 years, and you see that reflected in this top 10 list,” says economist Dr. Svenja Gudell. “Buying a home is one of the biggest financial decisions people will make in their lifetime, and it really paid off for sellers in these cities. Every city on this list has been growing extremely fast over the past decade, with the majority passing peak home value hit during the housing bubble.”

The ability to amass wealth over the long term makes real estate the No. 1 investment for most Americans, despite proven results from stocks and other vehicles.

“It’s extremely difficult to time the market, but if you’re a longtime homeowner in one of these cities, you could potentially see a great return on your investment,” Gudell says.