Rotating panel data are used with estimation of stochastic production frontier. The model can be viewed as a generalization of the regular production function estimation that accommodates technical inefficiency as well as firm heterogeneity. In particular, while estimating technical efficiency for each firm over time we control for firm-specific effects and separate them from technical inefficiency. Estimation of the model is considered in two steps. In the first step we estimate parameters of the underlying production function using generalized least squares method which are then used in the estimation of technical efficiency in the second step. As an empirical application we used rotating data on 1425 Swedish dairy farms observed during 1976-1988. The mean technical efficiency of these farms is found to be 94.5% and 16% of the farms are fully efficient. Evidence of technical regress about 1% annum is observed during 1976 to 1984.