^{3}– 24Q + 9 or TC = Q + log(Q+2).

### Marginal Cost

Marginal cost is the additional cost we have when we produce one more unit of the good. The most accurate way of calculating the marginal cost is with calculus. Marginal cost is essentially the rate of change of total cost, so it is the first derivative of total cost. So using our two formulas for total cost, we take the first derivate of total cost to find the expressions for marginal cost:
*TC = 34Q ^{3} – 24Q + 9;
TC’ = MC = 102Q^{2} – 24.*

*TC = Q + log(Q+2)
TC’ = MC = 1 + 1/(Q+2).*

So when total cost is 34Q^{3} – 24Q + 9, marginal cost is 102Q^{2} – 24, and when total cost is Q + log(Q+2), marginal cost is 1 + 1/(Q+2). To find the marginal cost for a given quantity, just substitute the value for Q into each expression for marginal cost.

### Total Cost

We already have a formulation for the total cost, so we do not need to do any work.

### Fixed Cost

Our fixed cost is the costs we incur when we do not produce any units. So we substitute in Q = 0 to our equations. When total costs are = 34Q^{3}– 24Q + 9, our fixed costs are 34*0 – 24*0 + 9 = 9. This is the same answer we get if we eliminate all the Q terms, but this will not always be the case. When total costs are Q + log(Q+2), our fixed costs are 0 + log(0 + 2) = log(2) = 0.30. So although all the terms in our equation have a Q in them, our fixed cost is 0.30, not 0.

### Total Variable Costs

These are the non-fixed costs we incur when we produce Q units. So our variable costs are:
*Total Variable Costs = Total Costs – Fixed Costs.*

With our first equation, our total costs are 34Q^{3} – 24Q + 9 and our fixed costs is 9, so our total variable costs are 34Q^{3} – 24Q. Our second total cost equation is Q + log(Q+2) and our fixed cost is log(2), so our total variable costs are Q + log(Q+2) – 2.

### Average Total Costs

We are averaging our total costs over the number of units we produce. So to get the average total cost, we take our total cost equations and divide them by Q. So for our first equation, we have a total cost of 34Q^{3}– 24Q + 9 and an average total cost of 34Q

^{2}– 24 + (9/Q). When our total costs are Q + log(Q+2), our average total costs are 1 + log(Q+2)/Q.

### Average Fixed Costs

Similarly, we just divide our fixed costs by the number of units we produce. So when our fixed costs are 9 our average fixed costs are 9/Q and when our fixed costs are log(2), our average fixed costs are log(2)/9.

### Average Variable Costs

As you may have guessed, to calculate our average variable costs we divide our variable costs by Q. In our first example our total variable costs were 34Q^{3}– 24Q, so our average variable costs are 34Q

^{2}– 24. In our second example our total variable costs were Q + log(Q+2) – 2, so our average variable costs are 1 + log(Q+2)/Q – 2/Q.

That should be everything you need to know about figuring out how to calculate the different cost functions. As always, if you have a question on cost functions, macroeconomics, or any other economics topic you'd like answered please use the feedback form.