Cost Function Formula Calculus, Both, the marginal cost and total cost are functions of the quantity of goods produced.