In Dallas-Fort Worth's tight housing market, finding a home is half the battle.

Then buyers have to come up with the cash. In D-FW, homebuyers have to fork over an average $42,057 just to get in the door, according to a new study by Zillow.

That's slightly ahead of the nationwide cost of $40,080.

The upfront cost figures include average down payments, closing costs and moving expenses.

"Buying a home, especially for the first time, is an exciting but stressful experience," Justin LaJoie, with Zillow's RealEstate.com, said in the report. "Some of that stress can be eased by making sure you know all of the costs that come with buying and owning a home, so you can budget appropriately and not get caught off guard well into the buying process."

While buying that North Texas house costs a chunk of change up front, the expense in the D-FW area is much lower than in coastal markets.

In San Francisco, you need more than $152,000 in cash on average to swing a home purchase. And in Seattle, it takes more than $80,000.

Among the major Texas markets, the average upfront cost is $52,142 in Austin, $37,347 in Houston and $35,327 in San Antonio.

The Zillow estimates for the D-FW area are based on a median home value of $231,100, which is a bit less than the most recent estimates from real estate agents.

The comparison also assumes the buyer is making a 15 percent down payment. Many first-time buyers pay much less than that up front.