The degree to which financial constraint is binding is often not directly observable in commonly used business data sets (e.g., Compustat). In this paper, we measure and estimate the likelihood of a firm being constrained by external financing using a data set of small- and medium-sized Canadian firms. Our measure separates the need for financing from the degree of constraint, conditional on the need for financing. We find that firm size, the current-debt-to-asset ratio and cash flow are robust indicators that can be used as a proxy for financial constraint. The total debt-to-asset ratio is not, however, a statistically significant indicator of financial constraint. In addition, firms with higher cash flow are less likely to need external financing and to be constrained if they do need it. We then estimate firm-level total factor productivity by taking into account the measured likelihood of binding financial constraint. Estimates of the coefficients for labour and capital in the structural estimation of the production function can be downward-biased if financial constraint is omitted, because production inputs are negatively correlated with the likelihood of being constrained by external financing. This in turn leads to an upward bias of total factor productivity estimates, which is about 4 per cent according to our estimation.