This paper shows that the R&D intensity of an industry plays an important role in determining international trade patterns via its e¤ect on scale economies. I first develop a model of trade with heterogeneous firms where firms compete with each other by spending on fixed product development costs such as R&D. The model predicts that a larger share of firms are exporters in industries where R&D is a large component of total costs. The model also predicts that R&D-intense industries are less sensitive to trade costs. I find empirical support for these predictions using firm-level data for Swedish manufacturing industries. The results also highlight the importance of controlling for firm size when measuring the firm extensive margin of exports.