Chapter 23. Computing General Equilibrium Theories of Monopolistic Competition and Heterogeneous Firms This chapter considers alternatives to the Armington formulation of international trade found in most computable general equilibrium (CGE) models. International trade structures consistent with the monopolistic competition models suggested by Krugman (1980) and Melitz (2003) are presented in a computational setting. The Melitz structure of heterogeneous firms is particularly appealing given its consistency with micro level findings on firm sizes and export behavior. We broaden the accessibility of these advanced trade theories for CGE modelers and strengthen the link between contemporary CGE analysis and the broader trade community. Small scale examples of all three theories (Armington Krugman and Melitz) are introduced under a unified treatment. This is helpful in translating the advanced theories into an environment that is more familiar to CGE modelers. It is also helpful in showing how the different approaches affect outcomes in a relatively transparent setting. Moving to an applied setting we offer our approach to calibration and computation of models that include the Melitz heterogeneous firms structure. Our applications include an analysis of economic integration and subglobal climate policy in a model calibrated to the Global Trade Analysis Project (GTAP) data. We do find that the heterogeneous firms structure matters for conclusions drawn from empirical CGE analysis. In our analysis of economic integration we find endogenous entry leading to important variety effects. We also find important productivity effects related to the competitive selection of more productive firms. In our examination of subglobal climate policy we see substantial trade diversion in the Melitz structure. This exacerbates the problem of carbon leakage and impacts the emissions yields from carbon based tariffs.