We analytically characterize the aggregate productivity loss from allocative distortions in a setting that accounts for the sectoral linkages of production. We show that the effects of distortions and the role of sectoral linkages depend crucially on how substitutable inputs are. We find that the productivity loss is smaller if input substitutability is low. Moreover, with low input substitutability, sectoral linkages do not systematically amplify the effects of distortions. In addition, the impact of the sectors that supply intermediate inputs becomes smaller. We quantify these effects in the context of the distortions caused by market power, using industry-level data for 35 countries. With our benchmark calibration, which accounts for low input substitutability, the median aggregate productivity loss from industry-level markups is 1.3%. To assume instead unit elasticities of substitution (i.e., to use a Cobb-Douglas production function) would lead to overestimating the productivity loss by a factor of 1.8. Sectoral linkages do amplify the cost of markups, but the amplification factor is considerably weaker than with unit elasticities.