Although there is an extensive literature on the measurement of total factor productivity (TFP) and its decomposition, the benefits of international trade for aggregate TFP have been less frequently studied. Combining the theoretical trade models and the so-called proxy-variable approach, this paper provides a new method for estimating trade elasticities based on a production model where trade elasticities and technological parameters are estimated simultaneously. Our proposed model is used to analyse the main determinants of the degrees of openness (embeddedness) of countries and sectors. Using data from the World Input-Output Database, we find that the pecuniary productivity gains attributable to embeddedness tend, on average, to offset its effect on sectors’ underlying productivity. We also use the model to measure the different factors affecting productivity changes due to the Covid-19 pandemic. We find that the trade-related consequences are important in explaining the contraction in countries’ productions.