Where you live can have a big impact on your future prosperity.
That's because the country's most expensive housing markets have appreciated at a much faster clip in the last 30 years than homes in the country's least expensive markets.
Home prices in the priciest cities have increased two times as fast as those in the least expensive areas, according to a Trulia report released Wednesday. (See editor's note below)
In 1986, the average home price in the nation's most expensive markets was $127,058. That's 144% higher than the average home price of $52,022 in the least expensive real estate markets.
Fast forward to 2016, and the average home price in the costliest markets is $493,504 -- nearly 320% higher than the current $117,827 home price average in the lowest priced markets.
That means buyers who are able to purchase a home in the expensive places have seen a much bigger return on their investments, and will likely be able to pass along more wealth to future generations.
Take for example San Francisco, which was the most expensive place to buy in 1986 and 2016: The typical buyer who purchased 30 years ago and has since paid off the mortgage, has seen home values increase by nearly $900,000.
In Dayton, Ohio, which was among the markets with the smallest return on home value over the last three decades, buyers have seen a $51,789 change in their median home values.
"That is a huge discrepancy," noted Ralph McLaughlin, Trulia's chief economist. "If you have children and you are going to pass down those gains, you can do a lot more with $900,000 than $50,000."
And the price gap between the most and least expensive housing markets isn't going to close any time soon.
"If there are going to be changes to inequality, we are talking generations rather than decades," McLaughlin noted.
The main factors driving up home values is income growth and housing supply, according to the report.
The more expensive markets tend to have higher incomes, which can push up home prices since buyers are able to afford more and compete against each other.
The pricier cities also tend to have less building activity, which can limit supply and drive up prices when demand increases.
And when housing costs increase, local employers increase wages in order to retain talent.
Homeownership brought the smallest gains in Rochester, New York, according to the report, where buyers gained 85% of their home's value since 1986.
There have only been four changes to the list of the 20 most expensive during the past 30 years: Portland, Oregon; Seattle, Denver and Washington, D.C. They replaced Dallas; Hartford, Connecticut; Worcester, Massachusetts and Riverside, California.
Here are the areas that have seen the biggest return on home values since 1986:
1. San Francisco
2. San Jose, California
3. Honolulu, Hawaii
5. Portland, Oregon
6. Oakland, California
7. Orange County, California
8. Los Angeles
9. San Diego
Editor's note: An earlier version of this story showed that home values in the most expensive markets have appreciated 10 times as fast as those in the least expensive markets. Trulia has corrected their report to show that expensive markets have appreciated two times as fast as the least expensive.