Tax audits are essential for governments to raise revenue, but can create economic distortions. Using detailed administrative data from the Ugandan Revenue Authority and a regression discontinuity design we show that receiving a comprehensive tax audit – the most intense tax enforcement measure – reduces the potential revenue collected among firms in a developing country, Uganda. It is challenging to understand implications on firm output because comprehensive audits may affect both tax filing behavior (evasion) and firm sales (real output). We overcome this by linking a novel survey with the administrative tax data. We show that the reduction in revenue is driven by changes in firm operations. The comprehensive audit causes 16% of audited firms to shut down. Further survey evidence supports the argument that the primary reason for shutting down is the audit. Conditional on remaining operational, firms reduce their output after the audit. Overall the results suggest that audits impose large costs on audited firms in our context and ultimately hurt both revenue collection efforts and the real economy.