Homeownership paid big dividends for Southern Californians who have owned their residences since the housing recovery began five years ago.

The average Southern California homeowner with a mortgage gained $210,000 in home “equity” from the spring quarter of 2012 through the spring quarter of 2017, real estate data firm CoreLogic reported Thursday, Sept. 21.

The gain was even bigger in Orange and Los Angeles counties. The typical Orange County homeowner saw his or her equity soar $238,000 from the spring of 2012, while in Los Angeles County, equity gains averaged $241,000.

The average gain in the Inland Empire counties of Riverside and San Bernardino was $138,000.

Combined homeowner gains for the region totaled $591 billion, CoreLogic figures show.

That included $125 billion in combined gains in Orange County, $352 billion in Los Angeles County and $114 billion in the Inland Empire.

Equity is the amount of home value above debt, representing what a homeowner would pocket from a sale after paying off the mortgage — not counting sales costs.

That means a Southern California homeowner who put $60,000 down on a home purchase in June 2012 saw his or her equity more than quadruple over the past five years to $270,000.

Home price increases drove these equity gains, CoreLogic reported. And monthly principal payments added more equity by paying down the debt a little at a time.

Nationwide, homeowner wealth increased $4.2 trillion from the spring of 2012 to the spring of 2017, data showed. That’s an average equity gain of $77,000 in the nation as a whole.

In the past year alone, equity gains averaged $12,987 per U.S. homeowner, for a combined U.S. gain of $766 billion in personal home value from the spring of 2016 through this past spring.

California equity grew $1.5 trillion in the past five years, an average of $222,000 per homeowner — $30,000 in the past year alone.

Only Washington (where equity was up $40,379) and Hawaii (up $33,834) had bigger year-over-year equity gains this past spring.

On the flip side, the number of underwater homes — or homes where mortgage debt exceeds the home’s total value — continued to decline.

Orange County had 6,429 underwater homes during the spring quarter, down from 9,159 a year earlier. That represents 1.2 percent of all mortgaged homes in the county. Homes went underwater mainly because of price drops that occurred during the 2007-12 housing downturn. By comparison, Orange County had more than 130,000 underwater homes at the height of the downturn in 2009.

In Los Angeles County, 34,390 homes, or 2.3 percent of mortgaged residences, were underwater — about 15,000 fewer than a year earlier.

The Inland Empire still had the biggest hangover from the housing crash: 54,402 homes there, or 6.3 percent of all mortgage residences, were underwater. But almost 22,000 Inland Empire homes have regained equity in the most recent year thanks to rising home prices.

Nationwide, the number of underwater homes fell 10 percent in the most recent year to 2.8 million homes, CoreLogic reported. That represents 5.4 percent of all mortgaged U.S. homes.

“Over the past 12 months, approximately 750,000 borrowers achieved positive equity,” said CoreLogic Chief Economist Frank Nothaft. “That means that mortgage risk continues to decline and, given the continued strength in home prices, CoreLogic expects home equity to rise steadily over the next year.”