Read 5 of 5

Cost functions, average cost and marginal cost

How does economic cost change with output?

In the previous reading, we worked out the economic cost of a single project. Firms usually face a broader question: how much should they produce? To answer it, we need to know the economic cost of every possible level of output. A cost function gives us exactly that.

We start with a simple case, a bakery whose cost rises by the same amount with every extra loaf. Then we look at what happens when each extra loaf costs more than the one before.

Finally, we introduce two tools for analyzing a cost function, each answering a different question. Average cost tells us the cost per unit. Marginal cost tells us how much cost increases when we produce more.

5.1

The economic cost function

Let \(q\) stand for the quantity of a good or service a firm produces. We write the economic cost of producing \(q\) units as , read “\(C\) of \(q\).” For example, \(C(100)\) is the cost of producing 100 units. A cost function lets us compare different production plans and see how cost changes when output changes.

Costs come in two kinds. A stays the same no matter how much the firm produces, like the rent on a shop. A rises or falls with output, like the ingredients a bakery uses. Two qualifications matter. A cost is fixed only over a given period: rent may be fixed for a month but not over five years. It is also fixed only over a given range of output: if the bakery grew enough to need a second shop, its rent would change.

Total cost is fixed cost plus variable cost. Variable cost depends on \(q\), so we write it as \(VC(q)\), while fixed cost is written simply as \(FC\):

Economic cost function\(C(q)=FC+VC(q)\)

Fixed isn't the same as . The two words answer different questions. A cost is fixed if it doesn't change with how much the firm produces. A cost is if the firm could escape it by making a different decision. So a cost can be fixed and avoidable at the same time. Take a bakery's rent. It's fixed because it doesn't depend on how many loaves the bakery bakes. But if the owner is deciding whether to stay open at all and could end the lease or sublet the shop, the rent is avoidable.

Fixed costs often arise because some commitments can't be changed quickly. A signed lease or an equipment contract ties the firm in for a while, even if it would like to get out. Over a longer period, these commitments can be renegotiated or ended. We'll return to this distinction between the short run and the long run in Week 2.

Every term in \(C(q)\) is an economic cost in the sense of the previous reading. The cost function includes only the costs relevant to the production decision we're studying, not every expense that appears in the firm's accounts. That's why it matters which decision we have in mind. Fixed costs don't change with how much the bakery produces, so they can't help it choose between baking 100 loaves and 200. They do matter when the question is whether to open for the month at all.

5.2

The bakery's fixed and variable costs

Consider a small bakery that makes specialty sourdough bread. Each month, it pays $2,000 in rent, $500 to lease a commercial oven and $300 for insurance. It also pays its full-time manager a salary of $3,000 a month. None of these costs depends on how many loaves the bakery bakes, at least over the month and the range of output we're considering. They are the bakery's fixed costs.

Monthly fixed costAmount
Rent$2,000
Equipment lease$500
Insurance$300
Manager's salary$3,000
Total fixed cost$5,800

The bakery also has costs that depend on how many loaves it bakes. For each loaf, it spends $0.50 on flour, $0.10 on yeast, $0.05 on salt, $0.15 on other ingredients, $0.20 on packaging and $0.25 on utilities such as electricity for the oven. It also needs labor. The bakery employs part-time bakers at $15 an hour, and each loaf takes 0.25 hours (15 minutes) of their time. Because the bakers are paid only for the hours they work, labor is a variable cost too: \(\$15\times0.25=\$3.75\) per loaf.

Variable cost per loafAmount
Ingredients$0.80
Packaging$0.20
Part-time labor$3.75
Utilities$0.25
Total per loaf$5.00

Each loaf therefore adds $5.00 to the bakery's variable cost. If the bakery bakes 100 loaves, its variable cost is \(100\times\$5=\$500\). If it bakes 200 loaves, its variable cost is $1,000. Doubling output doubles variable cost. In other words, variable cost rises in direct proportion to output, and we can write it as \(VC(q)=5q\).

5.3

A linear cost function

Putting the pieces together, the bakery's fixed cost is $5,800 a month and its variable cost is $5 per loaf. If \(q\) is the number of loaves it bakes in a month, its cost function is:

Bakery\(C(q)=5{,}800+5q\)

At 100 loaves, total cost is \(C(100)=5{,}800+5(100)=\$6{,}300\). At 200 loaves, it's \(C(200)=5{,}800+5(200)=\$6{,}800\). Baking the extra 100 loaves adds $500 of variable cost, but the fixed cost of $5,800 stays the same.

More generally, a linear cost function has the form \(C(q)=a+bq\), where \(a\) and \(b\) are numbers that describe a particular firm. We call them parameters. The parameter \(a\) is the fixed cost, what we wrote as \(FC\) earlier, and \(b\) is the variable cost per unit. For the bakery, \(a=5{,}800\) and \(b=5\).

The function is called linear because its graph is a straight line. The line starts at \(a\) when \(q=0\): even if the bakery bakes nothing, it still pays its fixed costs. From there, each extra unit adds \(b\) to total cost, so \(b\) is the slope of the line. Raising \(a\) shifts the whole line up without changing its slope. Raising \(b\) makes the line steeper because each extra unit now adds more to total cost.

The linear form works well when each extra unit costs the same amount to produce, at least over the range of output we care about. It's a simplification. Whether it's a good one depends on the production process. For some businesses, the cost of each extra unit really is roughly constant. For others, as we'll see next, it isn't.

5.4

Crowding and a quadratic cost

So far, we've assumed that every loaf costs the same $5 to make. That isn't always realistic. The bakery has one oven, one proofing area and limited bench space, and none of these grows when the bakery bakes more. With each extra loaf, the kitchen gets a little busier. Bakers wait longer for the oven, work around each other and spend more time moving trays between batches. As a result, each additional loaf takes slightly more labor time than the one before, and so costs slightly more to make.

A convenient way to capture this is to add a term \(cq^2\) to the cost function, where \(c\) is a positive number. Because the new term contains \(q\) squared, we call the result a quadratic cost function:

Quadratic cost function\(C(q)=a+bq+cq^2\)

The fixed cost is still \(a\). The term \(bq\) covers the costs that are the same for every loaf: ingredients, packaging, utilities and the labor a loaf would need in an uncrowded kitchen. The term \(cq^2\) captures the extra cost of crowding. Because \(q\) is squared, this extra cost grows faster than output: doubling the number of loaves quadruples the crowding cost. The parameter \(c\) measures how severe the crowding is. A bigger kitchen or a second oven would mean a smaller \(c\).

For the bakery, \(a=5{,}800\) and \(b=5\). Setting \(c=0\) takes us back to the linear cost function, an uncrowded kitchen where every loaf costs the same. A positive \(c\) adds the cost of crowding. Use the interactive cost explorer to change all three parameters and see how the cost function responds.

Open the bakery cost explorer →

5.5

Average cost

A cost function tells us the total cost of producing \(q\) units. Often we also want to know the cost per unit. That's , and we find it by dividing total cost by the number of units:

Average cost\(AC(q)=\frac{C(q)}{q}\)

For the bakery, \(C(q)=5{,}800+5q\). Dividing each term by \(q\) gives:

Bakery\(AC(q)=\frac{5{,}800}{q}+5\)

At 100 loaves, average cost is \(\frac{5{,}800}{100}+5=58+5=\$63\) per loaf. At 200 loaves, it falls to \(29+5=\$34\) per loaf.

The two pieces of this formula have names. The first, \(5{,}800/q\), is average fixed cost: the bakery's fixed cost spread across all the loaves it bakes. The second, \(5\), is average variable cost: the variable cost per loaf, which for the bakery is the same at every level of output.

Notice what drives the fall in average cost. Average variable cost stays at $5. What changes is average fixed cost. When the bakery bakes only a few loaves, the $5,800 is shared among a small number of them, so each loaf carries a large share. As output grows, the same fixed cost is spread over more loaves, and each loaf's share shrinks. In general, average fixed cost \(a/q\) falls as \(q\) rises.

Linear cost\(AC(q)=\frac{a}{q}+b\)

Average fixed cost falls; average variable cost is constant.

Quadratic cost\(AC(q)=\frac{a}{q}+b+cq\)

Average fixed cost falls while the quadratic component rises.

5.6

Marginal cost

tells us how much total cost rises when a firm produces more. How we calculate it depends on how output is measured.

Some goods come in whole units that we count, such as cakes, cars or loaves of bread. We call this discrete output. Here, the marginal cost of producing one more unit is the difference between two total costs:

One additional unit\(MC(q)=C(q+1)-C(q)\)

Read \(MC(q)\) as the cost of going from \(q\) units to \(q+1\). So the marginal cost of the tenth unit is \(MC(9)=C(10)-C(9)\).

Suppose a firm can make nine units for $180, and the tenth unit has a marginal cost of $40. Then ten units cost $180 + $40 = $220. Notice what happens to average cost: it rises from $180/9 = $20 to $220/10 = $22. The tenth unit cost more than the average of the first nine, so it pulled the average up. We return to this later in the reading.

Other outputs, such as electricity, water or chemicals, can be produced in any quantity, not just whole units. We call this continuous output. Here, it makes more sense to look at a small change in output, which we write as \(\Delta\), the Greek letter delta, commonly used to mean “change.” If output rises from \(q\) to \(q+\Delta\), marginal cost is the change in cost per unit of extra output:

Change in cost per unit of output\(MC(q)=\frac{C(q+\Delta)-C(q)}{\Delta}\)

As \(\Delta\) gets smaller and smaller, this ratio settles on a single number: the rate at which cost is rising at exactly \(q\). In calculus, this number is called the derivative of the cost function. The next two sections work it out step by step for our two cost functions.

The results are simple. For a linear cost function, marginal cost is \(b\): every extra unit adds the same amount to cost. For the bakery, that's $5 per loaf. For a quadratic cost function, marginal cost is \(b+2cq\), which rises as \(q\) grows. This is the crowded kitchen at work: the more loaves the bakery is already baking, the more the next one costs.

Linear\(MC(q)=b\)

Each additional unit adds the same amount to cost.

Quadratic\(MC(q)=b+2cq\)

Marginal cost changes with output.

5.7

Deriving marginal cost for the linear function

Apply the change-in-cost formula to \(C(q)=a+bq\). First replace \(q\) with \(q+\Delta\) and expand:

\(\begin{aligned}C(q+\Delta)&=a+b(q+\Delta)\\&=a+bq+b\Delta\end{aligned}\)

Subtract \(C(q)=a+bq\):

\(\begin{aligned}C(q+\Delta)-C(q)&=(a+bq+b\Delta)-(a+bq)\\&=b\Delta\end{aligned}\)

Divide by \(\Delta\):

\(\begin{aligned}\frac{C(q+\Delta)-C(q)}{\Delta}&=\frac{b\Delta}{\Delta}\\&=b\end{aligned}\)

The result doesn't depend on the size of the output change. Each additional unit adds \(b\) to total cost. The fixed cost \(a\) cancels because it doesn't change with output.

5.8

Deriving marginal cost for the quadratic function

We can see where \(b+2cq\) comes from by applying the change-in-cost formula to \(C(q)=a+bq+cq^2\). First replace \(q\) with \(q+\Delta\), then expand and collect terms:

\(C(q+\Delta)\)\(=\)\(a+b(q+\Delta)+c(q+\Delta)^2\)Substitute \(q+\Delta\).\(=\)\(a+bq+b\Delta+c(q^2+2q\Delta+\Delta^2)\)Expand.\(=\)\(a+bq+cq^2+b\Delta+2cq\Delta+c\Delta^2\)Collect terms.

Now subtract \(C(q)=a+bq+cq^2\):

\(C(q+\Delta)-C(q)\)\(=\)\((a+bq+cq^2+b\Delta+2cq\Delta+c\Delta^2)-(a+bq+cq^2)\)Subtract \(C(q)\).\(=\)\(b\Delta+2cq\Delta+c\Delta^2\)Cancel common terms.

Divide by \(\Delta\):

\(\dfrac{C(q+\Delta)-C(q)}{\Delta}\)\(=\)\(\dfrac{b\Delta+2cq\Delta+c\Delta^2}{\Delta}\)Substitute the numerator.\(=\)\(\dfrac{b\Delta}{\Delta}+\dfrac{2cq\Delta}{\Delta}+\dfrac{c\Delta^2}{\Delta}\)Split the fraction.\(=\)\(b+2cq+c\Delta\)Cancel \(\Delta\).

When output is continuous, \(\Delta\) approaches zero. The final term disappears, leaving \(MC(q)=b+2cq\). Notice that fixed cost \(a\) doesn't appear in marginal cost because it doesn't change when output changes.

5.9

The relationship between average and marginal cost

Average cost and marginal cost answer different questions. Average cost asks: at the current level of output, how much does each unit cost on average? Marginal cost asks: if we produce more, how much does total cost go up?

The two are linked by the same logic that applies to any average. If the next unit costs less than the current average, adding it pulls the average down. If it costs more, it pushes the average up. We saw this in the previous section: the tenth unit cost $40, well above the $20 average, and average cost rose to $22.

So there is a simple rule. When marginal cost is below average cost, average cost is falling. When marginal cost is above average cost, average cost is rising.

This rule tells us where average cost is lowest. Suppose average cost first falls and then rises, as it does with the bakery's quadratic cost function. At the very bottom, average cost is neither falling nor rising. Marginal cost can't be below average cost there, or the average would still be falling. It can't be above it either, or the average would already be rising. So at the output \(q^*\) where average cost is lowest, the two are equal:

Minimum average cost\(MC(q^*)=AC(q^*)\)

(If you know calculus, you can show that this is the first-order condition for minimizing average cost.)

This equality holds only when average cost actually reaches a lowest point within the range of output the firm can produce, and that isn't always the case. Take the linear cost function \(C(q)=a+bq\) with a positive fixed cost. Average cost is \(a/q+b\) and marginal cost is \(b\). Since \(a/q\) is positive at any output, average cost is always above marginal cost. For the bakery, average cost is always more than $5 per loaf, getting closer to $5 as output grows and the fixed cost is spread more thinly. Average cost keeps falling and never reaches a lowest point, so the two never meet.

The equality can also fail in other situations: when output comes in whole units, so it jumps rather than changing smoothly; when average cost is lowest at the largest output the firm can produce; or when the average-cost curve has a sharp corner. In all of these cases, though, the basic rule still holds. Marginal cost below average cost pulls the average down, and marginal cost above average cost pushes it up.

Summary

C(q) is a cost function. \(AC(q)\) is the cost per unit when \(q\) units are produced, and \(MC(q)\) is the cost of additional output at production level \(q\). If \(AC(q)\) is differentiable and reaches its minimum at \(q^*\) inside the feasible output range, then \(MC(q^*)=AC(q^*)\). This equality need not occur with discrete output or a boundary minimum.

Concept atlas