Measuring economic and cost efficiency receives ever-increasing attention of the executives and managers of small-and medium-sized enterprises (SMEs) to minimise total production costs. The conventional Farrell cost efficiency (CE) as a key determinant requires the precise information on inputs, outputs and input prices, while in praxis uncertainty is inherent and inevitable in data and its negligence conceivably results in a dire approximation for CE measures. This paper is concerned with Farrell CE in situations of both endogenous and exogenous uncertainty. The source of uncertainty allows us to define two different scenarios; (i) in situations of endogenous uncertainty in input and output data where the uncertainty is affected by the decision maker's decisions, and (ii) in situations of uncertain prices for inputs where the uncertainty is exogenously given. In the first scenario, the theory of robust optimisation is adopted to develop the robust data envelopment analysis (DEA) models with the aim of grappling uncertainties in input and output data when measuring technical and cost efficiencies. The second scenario aims to accommodate uncertainties on price information by developing a pair of robust DEA models based upon robust optimisation estimating the upper and lower bounds for CE measures. This unprecedented study helps us to provide a generalised framework for economic efficiency with uncertainties in which conventional properties of Farrell measures are fulfilled. In addition to comparing the developed approach in this paper with other existing approaches through a simple numerical example, the usefulness and applicability of the suggested framework are minutely studied in an empirical application in the context of allocation problems.