The Marginal Cost Formula