This paper deals with estimation of production technology where endogeneous choice of input and output variables is explicitly recognized. To address this endogeneity issue, we assume that producers maximize return to the outlay. We start from a flexible (translog) transformation function with a single output and multiple inputs and show how the first-order conditions of maximizing return to the outlay can be used to come up with an ‘estimating equation’ that does not suffer from the econometric endogeneity problem although the output and input variables are chosen endogenously. This is because the regressors in this estimating equation are in ratio forms which are uncorrelated with the error term under the assumption that producers maximize return to the outlay. The analysis is then extended to the multiple outputs and multiple inputs case with technical inefficiency. Although the estimating equations in both single and multiple output cases are neither production nor distance functions, they can be estimated in a straightforward manner using the standard stochastic frontier technique without worrying about endogeneity of the regressors. Thus, we provide a rationale for estimating the technology parameters consistently using an econometric model which requires data on only input and output quantities.