We study the gains from trade liberalization in models with monopolistic competition, firm-level heterogeneity, and variable markups. For a large class of demand functions used in the international macro and trade literature, we derive a parsimonious generalization of the welfare formula in...