To estimate correctly the effect of variable trade costs on firms' exports, the gravity equation should control for the number of firms that participate in foreign markets. Due to the absence of these data, previous studies control for this omitted variable using econometric strategies that may also lead to inconsistent estimates. To overcome this problem the present paper estimates a gravity equation using a new database compiled by the OECD and EUROSTAT stat that reports the number of exporting firms by reporter and partner country. We show that not controlling for the extensive margin of trade introduces very serious biases in the estimated trade cost coefficients.