To meet a 20% down payment, homebuyers on average have to spend more than two-thirds of the average annual income, according to a report from Zillow.

A 20% down payment for a median-price home valued at $192,500 will cost $38,500. In some of the larger and more expensive markets, including the San Francisco and Los Angeles metropolitan areas, buyers may need to pay more than 180% of the average annual income to afford a 20% down payment on a median-priced home.

"Saving enough cash for a down payment is a major barrier to homeownership, especially in expensive markets, where a 20% down payment can cost nearly $200,000," Zillow Chief Marketing Officer Jeremy Wacksman said in a news release Friday.

Homebuyers of course can put less than 20% down. In many cases, however, a lower down payment could preclude them from receiving lower interest rates. Consequently, with rates now rising, a bigger down payment can lock in major savings: Zillow calculated that lowering the interest rate on a $200,000 loan by half a percentage point will save $20,000 over the loan's lifetime. Plus there is the additional cost of mortgage insurance, whether from a private company or the Federal Housing Administration.

"While it's possible to buy a house with a smaller down payment, 20% ensures the best rates," Wacksman said. "As important as it is to find a monthly payment you can afford, some buyers' budgets will come down to the amount of cash they can bring to the table."