Using a sample of up to 2,503 initial public offerings (IPOs) in 32 countries from 2011–2017, we predict and find that higher levels of country-level accounting enforcement are associated with lower levels of IPO underpricing. IPOs in countries with a relatively low accounting enforcement score (second quintile) exhibit a mean underpricing of 19%, whereas the mean underpricing amounts to just 9% in countries with a relatively high score (fourth quintile). The results remain qualitatively the same when we employ a multi-level model or a difference-in-difference design. In countries that substantially strengthened their accounting enforcement in the 2003–2009 period, the level of IPO underpricing decreased significantly. We show that accounting enforcement matters for the cost of going public.