The estimation of production functions suffers from an unresolved identification problem caused by flexible inputs, such as intermediate inputs. We develop an identification strategy for production functions based on a transformation of the firm's short-run first order condition that solves the problem for both gross output and valueadded production functions. We apply our approach to plant-level data from Colombia and Chile, and find that a gross output production function implies fundamentally different patterns of productivity heterogeneity than a value-added specification. This finding is consistent with our analysis of the bias induced by the use of value-added.