Calculating Marginal Cost