The cost of production per unit of a commodity is derived from the particular production function under which it is being produced. We formulate a generalized cost function, which brings production flexibility of a manufacturing system. We illustrate the results with a numerical example. We further explain the principle of Equi-marginal Returns and give numerical sensitivity analysis.