We provide a general non-parametric formula for aggregating microeconomic shocks in general equilibrium economies with distortions such as taxes, markups, frictions to resource reallocation, and nominal rigidities. We show that the macroeconomic impact of a shock can be boiled down into two components: its “pure” technology effect; and its effect on allocative efficiency arising from the associated reallocation of resources, which can be measured via changes in factor income shares. We also derive a formula showing how these two components are determined by structural microeconomic parameters such as elasticities of substitution, returns to scale, factor mobility, and network linkages. Overall, our results generalize those of Solow (1957) and Hulten (1978) to economies with distortions. To demonstrate their empirical relevance, we pursue different applications, focusing on markup distortions. For example, we operationalize our non-parametric results and show that improvements in allocative efficiency account for about 50% of measured TFP growth over the period 1997-2015. We also implement our structural results and conclude that eliminating markups would raise TFP by about 40%, increasing the economywide cost of monopoly distortions by two orders of magnitude compared to the famous 0.1% estimates of Harberger (1954).