It's tough to save up for a home. It's a whole lot tougher after poker, cigars and a few dozen jello shots.

Millennials spend an average of $1,532 on a single bachelor party, according to a new Zillow analysis of wedding data from The Knot. Without travel and lodging, that number shrinks to $738.

Bachelorette parties cost less: $1,106 on average per millennial guest, or $472 without travel and lodging.

Attending just nine bachelor parties in a lifetime will set you back $13,788, the site estimates — about one-third of the down payment on a median-value U.S. home. Considering that Americans attend an average three weddings per year, it isn't so far-fetched to start worrying that your spending habits on booze, flights and presents could keep you out of your dream home.

Here's how: The median U.S. home price is $200,400; a 20 percent down payment on a median-value residence is $40,080.

The damage varies by city. In the cheapest markets, such as Cleveland, millennials could sink half of a down payment partying. Even in San Jose, California, the country's most expensive housing market, millennials with nine bachelor parties under their belts will have spent 6.8 percent of a down payment on the typical $1,013,700 median home.