Money

Here's how much you'd have made if you bought a home in these cities 20 years ago

Aerial view of residential area of San Francisco just outside the downtown district.
DianeBentleyRaymond | Getty Images
Aerial view of residential area of San Francisco just outside the downtown district.

In some places around the U.S., house prices have gone up so much in just a couple of decades that the profits off of a home, whether from selling or from renting it out, could make you feel rich.

That's what personal finance site GOBankingRates found after looking at the median home value 20 years ago and the median home price today, among other data, for its latest report. Here are 16 cities where GBR saw incredible appreciation over the past two decades. (Read GBR's full methodology here.)

Seattle, Washington

Home value in 1998: $188,300
Median home price in 2018: $703,600

Profit from selling in 2018: $515,300
Profit from renting it out for five years: $145,086

Somerville, Massachusetts

Home value in 1998: $199,900
Median home price in 2018: $719,000

Profit from selling in 2018: $557,100
Profit from renting it out for five years: $156,537

Hoboken, New Jersey

Home value in 1998: $157,900
Median home price in 2018: $819,900

Profit from selling in 2018: $662,000
Profit from renting it out for five years: $164,997

Culver City, California

Home value in 1998: $235,900
Median home price in 2018: $912,000

Profit from selling in 2018: $676,100
Profit from renting it out for five years: $222,027

Bellevue, Washington

Home value in 1998: $239,300
Median home price in 2018: $924,900

Profit from selling in 2018: $685,600
Profit from renting it out for five years: $168,382

San Jose, California

Home value in 1998: $272,800
Median home price in 2018: $980,300

Profit from selling in 2018: $707,500
Profit from renting it out for five years: $189,890

Berkeley, California

Home value in 1998: $274,700
Median home price in 2018: $995,000

Profit from selling in 2018: $720,300
Profit from renting it out for five years: $204,662

Milpitas, California

Home value in 1998: $264,500
Median home price in 2018: $1,012,300

Profit from selling in 2018: $747,800
Profit from renting it out for five years: $185,746

East Palo Alto, California

Home value in 1998: $179,700
Median home price in 2018: $950,000

Profit from selling in 2018: $770,300
Profit from renting it out for five years: $186,432

Kailua, Hawaii

Home value in 1998: $309,100
Median home price in 2018: $1,095,000

Profit from selling in 2018: $785,900
Profit from renting it out for five years: $184,539

Santa Clara, California

Home value in 1998: $293,100
Median home price in 2018: $1,098,000

Profit from selling in 2018: $804,900
Profit from renting it out for five years: $198,744

Anna Maria, Florida

Home value in 1998: $232,200
Median home price in 2018: $1,099,000

Profit from selling in 2018: $866,800
Profit from renting it out for five years: $284,807

San Francisco, California

Home value in 1998: $311,000
Median home price in 2018: $1,195,000

Profit from selling in 2018: $884,000
Profit from renting it out for five years: $236,408

West Hollywood, California

Home value in 1998: $173,200
Median home price in 2018: $1,095,000

Profit from selling in 2018: $921,800
Profit from renting it out for five years: $240,742

El Segundo, California

Home value in 1998: $281,200
Median home price in 2018: $1,248,300

Profit from selling in 2018: $967,100
Profit from renting it out for five years: $237,422

Encinitas, California

Home value in 1998: $277,400
Median home price in 2018: $1,399,000

Profit from selling in 2018: $1,121,600
Profit from renting it out for five years: $219,246

Remember, real estate investments don't always yield returns like these and, depending on your individual situation, you may even be better off renting than buying. But if buying makes sense for you financially and especially if you're in the right place at the right time, data shows it can be an effective way to grow your money.

Like this story? Like CNBC Make It on Facebook!

Don't miss: Here's how much home you can afford depending on what you earn