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

4. Seattle

5. Portland, Oregon

6. Oakland, California

7. Orange County, California

8. Los Angeles

9. San Diego

10. Miami

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.