Economics
High Schoolmicroeconomics

The Costs of Production

A baker finds that 40 loaves and 160 loaves cost her exactly the same amount each — $12.50 a loaf — while 80 loaves cost only $10. Chasing down why the cost per loaf falls and then climbs again opens the black box behind the supply curve, and produces the one derivation every cost diagram is secretly built on.

Before this, you should know:

Amara has run the same neighbourhood bakery for six years, and last winter she started keeping a spreadsheet. Every day she wrote down two numbers: how many loaves she baked, and what the whole day cost her — oven lease, insurance, flour, the bakers she called in. Then she divided one by the other to get the cost of an average loaf.

The pattern she found made no sense to her at first. On a quiet Tuesday she baked 40 loaves, and the day cost $500 — $12.50 a loaf. On a frantic Saturday before a holiday she baked 160 loaves, and the day cost $2,000 — again $12.50 a loaf, to the cent. But on an ordinary Thursday she baked 80 loaves for $800, which is $10 a loaf. Two very different days cost the same per loaf, and a day exactly between them was 20% cheaper per loaf than either.

That is a strange shape for a cost to have. Costs are supposed to be costs — you would expect each loaf to cost whatever a loaf costs. Instead the number falls, bottoms out, and climbs back, and the bottom sits at one particular quantity: 80 loaves, not 79 and not 81. Amara's real question, the one that decides whether she should take Saturday orders at all, is where that bottom is and what puts it there.

There is a second reason to care, and it is bigger than one bakery. The supply and demand topic drew an upward-sloping supply curve and justified it with a sentence: at low prices only the cheapest sellers bother, and at higher prices sellers with higher costs find it worthwhile. That sentence was doing an enormous amount of unexamined work. Where do a seller's costs come from? Why should the cost of producing one more unit rise as a firm produces more, which is the only thing that can make a supply curve slope up? The supply curve was asserted. This topic opens it up, and it turns out that everything — the shape of the curve, the bottom of Amara's spreadsheet, the whole apparatus — falls out of one physical fact about production and one line of calculus.

Inside the black box: the production function

Start where cost actually starts, which is not with money at all but with a physical relationship: inputs in, output out. Amara's bakery has one commercial oven, which she leases, and it is the same oven whether she bakes 10 loaves or 200. What she can vary from day to day is labour — how many bakers she calls in. Write LL for bakers hired for the day and qq for loaves produced. The production function is the rule connecting them, and for this bakery it is

q=f(L)=40L.q = f(L) = 40\sqrt{L}.

One baker produces 40 loaves in a day. What does the second produce? Not another 40. Two bakers produce 40256.640\sqrt{2} \approx 56.6 loaves, so the second baker added about 16.6. Tabulate it at the labour levels where the arithmetic is exact — total product qq, and alongside it the marginal product of labour MPL=dqdL=20LMP_L = \dfrac{dq}{dL} = \dfrac{20}{\sqrt{L}}, the extra output from a marginal extra baker:

L1491625q=40L4080120160200MPL=20/L20106.654\begin{array}{r|rrrrr} L & 1 & 4 & 9 & 16 & 25 \\ \hline q = 40\sqrt{L} & 40 & 80 & 120 & 160 & 200 \\ MP_L = 20/\sqrt{L} & 20 & 10 & 6.\overline{6} & 5 & 4 \end{array}

The marginal product falls, and it falls fast: the fourth baker's marginal contribution is half the first's, the sixteenth's is a quarter. You can see the same thing without calculus by taking discrete blocks — going from 1 baker to 4 adds 40 loaves for 3 extra workers, about 13.3 loaves each; going from 9 to 16 adds 40 loaves for 7 extra workers, about 5.7 each.

This is diminishing marginal product, and the reason for it in this bakery is not mysterious or moral. It is the oven. One baker has the oven entirely to herself. Four bakers share it: they queue for the racks, they wait on proofing, they get in each other's way at the bench. The oven is fixed, so every extra baker is spread over a thinner slice of the one input that actually bakes bread. Nothing here says the fourth baker is lazier than the first. She is exactly as good — she just has a quarter of an oven to work with.

Hold on to the precise statement, because a later section will contrast it with something that sounds identical and is not: diminishing marginal product is about varying one input while the others are held fixed.

From the production function to the cost curve

Now put prices on the inputs. Amara pays a baker $100 for the day, so w=100w = 100. Her fixed costs (the oven lease, insurance, licences, the standby utilities) come to a flat $400 a day whether she bakes or not, so F=400F = 400.

To get cost as a function of output, invert the production function: ask not "how much output from LL bakers?" but "how many bakers to make qq loaves?" From q=40Lq = 40\sqrt{L},

L=q40L(q)=q21600.\sqrt{L} = \frac{q}{40} \quad\Longrightarrow\quad L(q) = \frac{q^2}{1600}.

Total cost is the fixed cost plus the wage bill:

TC(q)=F+wL(q)=400+100q21600=400+q216.TC(q) = F + w\,L(q) = 400 + 100 \cdot \frac{q^2}{1600} = 400 + \frac{q^2}{16}.

Check it against Amara's spreadsheet immediately, because a cost function you haven't checked is a guess. At q=40q = 40: 400+1600/16=400+100=500400 + 1600/16 = 400 + 100 = 500. ✓ At q=80q = 80: 400+6400/16=400+400=800400 + 6400/16 = 400 + 400 = 800. ✓ At q=160q = 160: 400+25600/16=400+1600=2000400 + 25600/16 = 400 + 1600 = 2000. ✓ All three of her days.

Notice what the algebra did to the shape. The production function had a square root in it — output grows more slowly than labour. Inverting a square root gives a square — labour, and therefore cost, grows faster than output. The convexity of the cost curve is diminishing marginal product, turned inside out.

That is worth proving in general rather than reading off one example. Let ff be any production function with f>0f' > 0 (more labour, more output) and f<0f'' < 0 (diminishing marginal product). Total cost is TC(q)=F+wf1(q)TC(q) = F + w f^{-1}(q), and by the inverse function rule dLdq=1f(L)=1MPL\dfrac{dL}{dq} = \dfrac{1}{f'(L)} = \dfrac{1}{MP_L}. So marginal cost — the derivative of total cost with respect to output — is

MC(q)=dTCdq=wdLdq=wMPL.MC(q) = \frac{d\,TC}{dq} = w \cdot \frac{dL}{dq} = \frac{w}{MP_L}.

Read that equation slowly, because it is the hinge of the whole topic: the cost of one more loaf is the wage divided by how many loaves a marginal worker-hour produces. If a marginal baker makes 20 loaves and costs $100, the marginal loaf costs $5. If a marginal baker makes only 10 loaves for the same $100, the marginal loaf costs $10. Differentiate once more to get the curvature:

dMCdq=wMPL2dMPLdq=wMPL2f(L)MPL=wf(L)MPL3,\frac{d\,MC}{dq} = -\frac{w}{MP_L^{\,2}} \cdot \frac{d\,MP_L}{dq} = -\frac{w}{MP_L^{\,2}} \cdot \frac{f''(L)}{MP_L} = -\frac{w\,f''(L)}{MP_L^{\,3}},

where the middle step used the chain rule, dMPLdq=dMPLdLdLdq=f(L)MPL\dfrac{d\,MP_L}{dq} = \dfrac{d\,MP_L}{dL}\cdot\dfrac{dL}{dq} = \dfrac{f''(L)}{MP_L}. Since w>0w > 0 and MPL>0MP_L > 0, the sign of dMC/dqdMC/dq is the opposite of the sign of ff''. Diminishing marginal product (f<0f'' < 0) therefore forces marginal cost to rise, which forces total cost to be convex. There is no way to have one without the other.

Check the general result against the bakery. Here f(L)=40L1/2f(L) = 40L^{1/2}, so f(L)=20L1/2=MPLf'(L) = 20L^{-1/2} = MP_L and f(L)=10L3/2f''(L) = -10L^{-3/2}. Then

dMCdq=100(10L3/2)(20L1/2)3=1000L3/28000L3/2=18.\frac{d\,MC}{dq} = -\frac{100 \cdot \left(-10 L^{-3/2}\right)}{\left(20L^{-1/2}\right)^3} = \frac{1000\,L^{-3/2}}{8000\,L^{-3/2}} = \frac{1}{8}.

And directly from TC=400+q2/16TC = 400 + q^2/16: MC=q/8MC = q/8, whose slope is 1/81/8. ✓ Same number, by two routes that share no arithmetic.

One more consistency check of the hinge equation itself. At q=80q = 80 the bakery uses L=802/1600=4L = 80^2/1600 = 4 bakers, so MPL=20/4=10MP_L = 20/\sqrt{4} = 10 and MC=w/MPL=100/10=10MC = w/MP_L = 100/10 = 10 dollars per loaf. From the cost function, MC=q/8=80/8=10MC = q/8 = 80/8 = 10. ✓

Six cost concepts, and the algebra tying them together

With TC(q)=400+q2/16TC(q) = 400 + q^2/16 in hand, every cost concept in microeconomics is a rearrangement of it. There are six, and they are worth defining precisely once rather than approximately six times.

Fixed cost FCFC is the part that does not move with output: FC=400FC = 400. It is the oven lease, and it is $400 whether Amara bakes 200 loaves or closes for the day.

Variable cost VC(q)VC(q) is the part that does: VC(q)=q2/16VC(q) = q^2/16, the wage bill. It is zero at zero output.

Total cost is their sum, which is just the definition written out: TC(q)=FC+VC(q)TC(q) = FC + VC(q).

Average fixed cost AFC(q)=FC/q=400/qAFC(q) = FC/q = 400/q — the overhead, spread over the loaves that carry it. This falls forever, and it never reaches zero. Bakers call it "spreading the oven".

Average variable cost AVC(q)=VC(q)/q=q/16AVC(q) = VC(q)/q = q/16.

Average total cost ATC(q)=TC(q)/q=400/q+q/16ATC(q) = TC(q)/q = 400/q + q/16. This is the number in Amara's spreadsheet. Since TC=FC+VCTC = FC + VC, dividing through by qq gives an identity you should be able to see instantly:

ATC(q)=AFC(q)+AVC(q).ATC(q) = AFC(q) + AVC(q).

Marginal cost MC(q)=dTCdq=q8MC(q) = \dfrac{d\,TC}{dq} = \dfrac{q}{8}, the cost of the next loaf. And here is a small point with large consequences:

MC(q)=ddq[FC+VC(q)]=dVCdq,MC(q) = \frac{d}{dq}\left[FC + VC(q)\right] = \frac{d\,VC}{dq},

because the derivative of a constant is zero. Fixed cost is invisible at the margin. Amara's oven lease does not appear anywhere in the cost of the next loaf; it cannot, because baking that loaf does not change the lease. Every decision about how much more to produce is made entirely with variable costs, which is why "but I have to cover my overheads" is not a reason to bake one more loaf.

Running the other way, marginal cost integrates back to variable cost — not to total cost, since the constant of integration is exactly the fixed cost that fell out:

0qMC(u)du=0qu8du=[u216]0q=q216=VC(q).\int_0^q MC(u)\,du = \int_0^q \frac{u}{8}\,du = \left[\frac{u^2}{16}\right]_0^q = \frac{q^2}{16} = VC(q). \checkmark

Here is the whole schedule, in dollars per day and dollars per loaf, with L=q2/1600L = q^2/1600 shown so you can see the physical side underneath:

qLVCTCAFCAVCATCMC401100500102.512.55602.252256256.63.7510.4167.58044008005510101006.25625102546.2510.2512.5120990013003.37.510.831516016160020002.51012.520\begin{array}{r|rrrrrrr} q & L & VC & TC & AFC & AVC & ATC & MC \\ \hline 40 & 1 & 100 & 500 & 10 & 2.5 & 12.5 & 5 \\ 60 & 2.25 & 225 & 625 & 6.\overline{6} & 3.75 & 10.41\overline{6} & 7.5 \\ 80 & 4 & 400 & 800 & 5 & 5 & 10 & 10 \\ 100 & 6.25 & 625 & 1025 & 4 & 6.25 & 10.25 & 12.5 \\ 120 & 9 & 900 & 1300 & 3.\overline{3} & 7.5 & 10.8\overline{3} & 15 \\ 160 & 16 & 1600 & 2000 & 2.5 & 10 & 12.5 & 20 \end{array}

Read the ATCATC column down: 12.512.5, 10.4210.42, 1010, 10.2510.25, 10.8310.83, 12.512.5. It falls, bottoms at q=80q = 80, and climbs — Amara's spreadsheet, reproduced from a production function and two prices. And now look at the MCMC column beside it. At q=40q = 40, MC=5MC = 5 while ATC=12.5ATC = 12.5: marginal cost is below average, and average is falling. At q=120q = 120, MC=15MC = 15 while ATC=10.83ATC = 10.83: marginal is above average, and average is rising. At q=80q = 80 — the bottom — they are equal, both exactly 1010.

That is not a coincidence about this bakery, and it is not a rule of thumb. It is a theorem.

Why marginal cost cuts average cost at its lowest point

Average total cost is total cost divided by quantity, so differentiate exactly that, with the quotient rule and nothing else:

dATCdq=ddq[TC(q)q]=TC(q)qTC(q)1q2=1q[TC(q)TC(q)q].\frac{d\,ATC}{dq} = \frac{d}{dq}\left[\frac{TC(q)}{q}\right] = \frac{TC'(q)\cdot q - TC(q)\cdot 1}{q^2} = \frac{1}{q}\left[TC'(q) - \frac{TC(q)}{q}\right].

The two terms in the bracket are things we have already named: TC(q)TC'(q) is marginal cost, and TC(q)/qTC(q)/q is average total cost. So

  dATCdq=MC(q)ATC(q)q  \boxed{\;\frac{d\,ATC}{dq} = \frac{MC(q) - ATC(q)}{q}\;}

For any positive quantity, q>0q > 0, so the sign of the whole expression is the sign of MCATCMC - ATC. Three statements follow immediately, and they are the entire content of every cost diagram ever drawn:

The mechanism, once you see it, is almost embarrassing in its simplicity: an average is pulled toward whatever you add to it. Add a loaf costing less than the current average, and the average must fall. Add one costing more, and it must rise. The average can only stop moving at the moment the next item costs exactly what the average already is.

Stationary is not the same as minimum, so finish the job with the second-order condition. Differentiate the boxed identity again:

d2ATCdq2=[MC(q)ATC(q)]q[MC(q)ATC(q)]q2.\frac{d^2 ATC}{dq^2} = \frac{\left[MC'(q) - ATC'(q)\right]q - \left[MC(q) - ATC(q)\right]}{q^2}.

Evaluate at a stationary point q0q_0, where by construction ATC(q0)=0ATC'(q_0) = 0 and MC(q0)ATC(q0)=0MC(q_0) - ATC(q_0) = 0. Both of those kill terms, leaving

d2ATCdq2q0=MC(q0)q0.\frac{d^2 ATC}{dq^2}\bigg|_{q_0} = \frac{MC'(q_0)}{q_0}.

So the stationary point is a genuine minimum precisely when marginal cost is rising there. Which, from the previous section, is precisely when the firm has diminishing marginal product. The whole chain holds together: diminishing marginal product \Rightarrow marginal cost rising \Rightarrow the point where MCMC meets ATCATC is the bottom of ATCATC, and the MCMC curve cuts the ATCATC curve there from below.

Verify all of it on the bakery. ATC(q)=400/q+q/16ATC(q) = 400/q + q/16, so

ATC(q)=400q2+116=0q2=6400q=80,ATC'(q) = -\frac{400}{q^2} + \frac{1}{16} = 0 \quad\Longrightarrow\quad q^2 = 6400 \quad\Longrightarrow\quad q^* = 80,

and ATC(80)=400/80+80/16=5+5=10ATC(80) = 400/80 + 80/16 = 5 + 5 = 10, while MC(80)=80/8=10MC(80) = 80/8 = 10. Equal, as the theorem demands. ✓ The boxed identity gives the same derivative independently: MCATCq=1q(q8400qq16)=116400q2\dfrac{MC - ATC}{q} = \dfrac{1}{q}\left(\dfrac{q}{8} - \dfrac{400}{q} - \dfrac{q}{16}\right) = \dfrac{1}{16} - \dfrac{400}{q^2}, which is ATCATC' exactly. ✓ And the second-order check: ATC(q)=800/q3ATC''(q) = 800/q^3, so ATC(80)=800/512000=1/640ATC''(80) = 800/512000 = 1/640, while MC(q0)/q0=(1/8)/80=1/640MC'(q_0)/q_0 = (1/8)/80 = 1/640. ✓

The quantity q=80q^* = 80 has a name: it is the firm's efficient scale, the output at which it produces most cheaply per unit. Notice what it is not: it is not the output that makes the most money. Nothing in this topic has mentioned revenue. Efficient scale is a fact about the cost side alone.

Two smaller observations that the table has already handed you. First, the identical derivation works for average variable cost, since MC=VCMC = VC' as well:

dAVCdq=MC(q)AVC(q)q.\frac{d\,AVC}{dq} = \frac{MC(q) - AVC(q)}{q}.

In this bakery AVC=q/16AVC = q/16 rises from the very first loaf — AVC=1/16>0AVC' = 1/16 > 0 everywhere — so it has no interior minimum, and consistently, MCAVC=q/8q/16=q/16MC - AVC = q/8 - q/16 = q/16 is positive everywhere: marginal cost sits above average variable cost at every output. The two only meet at the origin, where both are zero. (The worked example below uses a firm whose AVCAVC does bottom out at a positive quantity, and there the crossing is a real, visible one.)

Second, look at the q=80q = 80 row again: AFC=5AFC = 5 and AVC=5AVC = 5 — they are equal at exactly the efficient scale. That is a genuine feature of this cost function rather than a fluke of rounding, and it follows from the same condition: MC=ATCMC = ATC means q/8=400/q+q/16q/8 = 400/q + q/16, which rearranges to q/16=400/qq/16 = 400/q, which is literally AVC=AFCAVC = AFC. It is not a general law — it holds for cost functions whose variable cost is quadratic — but on this diagram it means the falling AFCAFC curve and the rising AVCAVC curve cross on the same vertical line where MCMC cuts ATCATC.

Four cost curves for a bakery, with loaves per day from 0 to 160 on the horizontal axis and cost per loaf from 0 to 20 dollars on the vertical axis. A blue straight line labelled MC rises from the origin. An amber straight line labelled AVC rises from the origin at half the slope of MC. A grey curve labelled AFC falls steeply from the top left and flattens toward the right. A purple U-shaped curve labelled ATC falls steeply from the top left, reaches its lowest point, and rises again. The blue MC line passes exactly through the lowest point of the purple ATC curve, marked with a black dot at 80 loaves and 10 dollars, with dashed grey guide lines running from that dot left to the 10 dollar tick and down to the 80 loaf tick. The amber AVC line and the grey AFC curve cross each other on that same vertical dashed line, at 5 dollars. An annotation reads: efficient scale, q equals 80, MC equals ATC equals 10 dollars.

The bakery's four cost curves. Marginal cost crosses average total cost exactly at the bottom of the ATC bowl, at 80 loaves and 10 dollars a loaf — not approximately, and not by drafting convention, but because the derivative of TC over q is (MC minus ATC) over q, which can only vanish where the two are equal. Average fixed cost falls forever while average variable cost rises, and here they happen to cross on the same vertical line.

Economic cost, accounting cost, and the costs nobody writes down

Everything so far counted money that leaves Amara's bank account. Her accountant would recognise all of it: $400 a day of fixed costs, $100 a day per baker. These are explicit costs — payments to somebody else.

But the opportunity cost topic established a principle that does not care about bank accounts: the cost of any choice is the value of the best alternative you gave up to make it. Apply that principle honestly to Amara and two large costs appear that her accountant never records.

She owns the storefront outright — she inherited it — so she pays no rent. But the shop next door, the same size, rents for $150 a day. By using the building as a bakery, Amara gives up $150 a day she could have collected as a landlord. That is a real cost of running the bakery, and it does not appear on any invoice.

She also works in the bakery full time and pays herself out of what's left. Before opening, she was a food-science consultant earning $350 a day, and the offer is still open. Every day she spends baking is a day she does not spend consulting.

These are implicit costs: opportunity costs of resources the firm already owns. Together they come to $500 a day. The two accounting systems now differ:

Accounting cost=explicit costs,Economic cost=explicit costs+implicit costs.\text{Accounting cost} = \text{explicit costs}, \qquad \text{Economic cost} = \text{explicit costs} + \text{implicit costs}.

And correspondingly,

Accounting profit=Rexplicit,Economic profit=Rexplicitimplicit.\text{Accounting profit} = R - \text{explicit}, \qquad \text{Economic profit} = R - \text{explicit} - \text{implicit}.

Put numbers on it. Bread sells for $12 a loaf, and Amara bakes 96 loaves a day. (Why 96 in particular, out of all the quantities she could choose? There is a sharp answer, and it is the subject of the next topic — for now take 96 as an observed fact about her bakery.) Revenue is R=12×96=1,152R = 12 \times 96 = 1{,}152 dollars a day. Her explicit total cost is

TC(96)=400+96216=400+921616=400+576=$976.TC(96) = 400 + \frac{96^2}{16} = 400 + \frac{9216}{16} = 400 + 576 = \$976.

So her accountant reports

Accounting profit=1152976=$176 per day,\text{Accounting profit} = 1152 - 976 = \$176 \text{ per day},

a healthy-looking $64,000 a year, and Amara feels like a successful small-business owner. Now the economist's version:

Economic profit=1152976500=$324 per day.\text{Economic profit} = 1152 - 976 - 500 = -\$324 \text{ per day}.

The bakery destroys $324 a day of value. Amara would be over $300 a day better off closing the shop, renting the building to a tenant, and going back to consulting — and no line of her accounts says so, because the alternative she is giving up never generates a receipt.

This is not a quibble about bookkeeping. It changes where the cost curves sit, and by exactly how much you can compute. Implicit costs of $500 a day are fixed — she forgoes the rent and the salary whether she bakes 10 loaves or 200 — so the economically correct fixed cost is F=400+500=900F = 400 + 500 = 900. Redo the efficient-scale calculation with a general FF, since it costs nothing to keep the symbol:

ATC(q)=Fq+q16ATC(q)=Fq2+116=0q=4F,ATC(q) = \frac{F}{q} + \frac{q}{16} \quad\Longrightarrow\quad ATC'(q) = -\frac{F}{q^2} + \frac{1}{16} = 0 \quad\Longrightarrow\quad q^* = 4\sqrt{F}, ATC(q)=F4F+4F16=F4+F4=F2.ATC(q^*) = \frac{F}{4\sqrt F} + \frac{4\sqrt F}{16} = \frac{\sqrt F}{4} + \frac{\sqrt F}{4} = \frac{\sqrt F}{2}.

Check against what we already know: F=400F = 400 gives q=4×20=80q^* = 4 \times 20 = 80 and ATC=20/2=10ATC^* = 20/2 = 10. ✓ Now with the true economic fixed cost F=900F = 900: q=4×30=120q^* = 4 \times 30 = 120 loaves and ATC=30/2=15ATC^* = 30/2 = 15 dollars a loaf. Two things moved, both interpretable. Efficient scale rose from 80 to 120, because a bigger overhead needs more loaves to spread it over. And the minimum possible average cost rose from $10 to $15 — which is above the $12 price. There is no quantity whatsoever at which this bakery covers its economic costs. The verdict is not "produce a bit less"; it is "this business should not exist", and it took the implicit costs to see it.

This is also why economists say a firm earning zero economic profit is doing fine. Zero economic profit means revenue exactly covers explicit costs plus everything the owner gave up — the owner is doing exactly as well as her best alternative, no better and no worse. Zero accounting profit, by contrast, means she has worked for free.

The short run, the long run, and returns to scale

Every curve above was drawn with the oven fixed. That is what economists mean by the short run: a horizon over which at least one input cannot be changed. The long run is the horizon over which all of them can — Amara can lease a second oven, or a third, or none.

This is not a length of time in weeks. It is a statement about which constraints bind. For a food cart the long run might be a month; for a nuclear plant, a decade.

Work out the long run for the bakery explicitly, because it produces a clean and slightly surprising answer. Suppose Amara can operate nn identical ovens, each with its own $400 daily fixed cost, and she splits output evenly among them — which is optimal here, since each oven's variable cost qi2/16q_i^2/16 is convex, so any uneven split costs more than the even one. Each oven then makes q/nq/n loaves at variable cost (q/n)2/16(q/n)^2/16, and

TCLR(q,n)=400n+n(q/n)216=400n+q216n.TC_{LR}(q, n) = 400n + n\cdot\frac{(q/n)^2}{16} = 400n + \frac{q^2}{16n}.

The two terms pull in opposite directions: more ovens means more overhead but less crowding. Minimise over nn, treating it as continuous for the moment:

TCLRn=400q216n2=0n2=q26400n=q80,\frac{\partial TC_{LR}}{\partial n} = 400 - \frac{q^2}{16n^2} = 0 \quad\Longrightarrow\quad n^2 = \frac{q^2}{6400} \quad\Longrightarrow\quad n^* = \frac{q}{80},

and 2TCLRn2=q28n3>0\dfrac{\partial^2 TC_{LR}}{\partial n^2} = \dfrac{q^2}{8n^3} > 0, so it is a minimum. Read n=q/80n^* = q/80 before substituting: the optimal number of ovens is whatever puts exactly 80 loaves through each one — the efficient scale we found earlier. The long-run plan is to replicate the best short-run plant as many times as needed. Substituting back:

TCLR(q)=400q80+q216q/80=5q+5q=10q,TC_{LR}(q) = 400\cdot\frac{q}{80} + \frac{q^2}{16 \cdot q/80} = 5q + 5q = 10q,

so long-run average cost and long-run marginal cost are both a flat

LRATC(q)=LRMC(q)=$10 per loaf.LRATC(q) = LRMC(q) = \$10 \text{ per loaf}.

The long-run average cost curve is horizontal, sitting at exactly the minimum of the short-run ATCATC curve and touching it at q=80q = 80. In general it is the lower envelope of all the short-run curves: with two ovens, TC=800+q2/32TC = 800 + q^2/32, whose minimum is at q=48002q = 4\sqrt{800 \cdot 2} — or directly, ATC=800/q+q/32ATC = 800/q + q/32 minimised at q2=25600q^2 = 25600, q=160q = 160, with ATC=5+5=10ATC = 5 + 5 = 10 dollars again. ✓ Two ovens do not make loaves cheaper; they make cheap loaves available in larger numbers.

One honest caveat: nn must be a whole number. At q=120q = 120 Amara must choose one crowded oven (ATC=400/120+120/16=10.83ATC = 400/120 + 120/16 = 10.8\overline{3}) or two idle ones (800/120+120/32=6.6+3.75=10.416800/120 + 120/32 = 6.\overline{6} + 3.75 = 10.41\overline{6} — better, but still above $10). The flat $10 is achieved only at q=80nq = 80n. This lumpiness is exactly where real-world increasing returns at small scale come from: you cannot buy a third of an oven.

That flat long-run curve has a name. A production function has constant returns to scale if scaling every input by λ\lambda scales output by λ\lambda; increasing returns if output scales by more; decreasing returns if by less. Our bakery, with both inputs free to move, produces q=40Lq = 40\sqrt{L} per oven times nn ovens with L/nL/n bakers each:

q(L,n)=n40Ln=40nL.q(L, n) = n \cdot 40\sqrt{\frac{L}{n}} = 40\sqrt{nL}.

Test it: q(λL,λn)=40λ2nL=λ40nL=λq(L,n)q(\lambda L, \lambda n) = 40\sqrt{\lambda^2 nL} = \lambda \cdot 40\sqrt{nL} = \lambda\, q(L,n). Constant returns to scale, exactly — which is why the long-run average cost came out flat. Double the ovens and the bakers, and you double the loaves at unchanged cost per loaf.

And now the contrast promised earlier, because these two ideas are confused constantly and they are not the same idea:

The same technology exhibits sharply diminishing marginal product and exactly constant returns to scale, with no contradiction whatsoever. Real firms usually show increasing returns at small scale (indivisible equipment, specialisation) and decreasing returns at very large scale (management strain, coordination cost), which bends the long-run curve into a shallow U — but the U comes from those specific frictions, not from anything in this section's logic.

Worked example

A pottery studio's daily total cost of producing qq bowls is TC(q)=50+10q0.5q2+0.05q3TC(q) = 50 + 10q - 0.5q^2 + 0.05q^3 dollars. (a) Write down FCFC, VCVC, AVCAVC, ATCATC and MCMC. (b) Find the output that minimises average variable cost, and verify that marginal cost equals AVCAVC there. (c) Find the output that minimises average total cost, and verify that marginal cost equals ATCATC there. (d) Explain, from the algebra, why the two minima are at different quantities. (click to reveal the solution)

Setting up (a) — read the pieces off the cost function. Fixed cost is total cost at zero output: TC(0)=50TC(0) = 50, so FC=50FC = 50. Everything else is variable:

VC(q)=10q0.5q2+0.05q3.VC(q) = 10q - 0.5q^2 + 0.05q^3.

Dividing by qq gives the averages, and differentiating TCTC gives the margin:

AVC(q)=VCq=100.5q+0.05q2,AFC(q)=50q,AVC(q) = \frac{VC}{q} = 10 - 0.5q + 0.05q^2, \qquad AFC(q) = \frac{50}{q}, ATC(q)=50q+100.5q+0.05q2,MC(q)=dTCdq=10q+0.15q2.ATC(q) = \frac{50}{q} + 10 - 0.5q + 0.05q^2, \qquad MC(q) = \frac{d\,TC}{dq} = 10 - q + 0.15q^2.

Step (b) — minimise average variable cost. AVCAVC is a simple quadratic, so differentiate and set to zero:

AVC(q)=0.5+0.1q=0q=5,AVC'(q) = -0.5 + 0.1q = 0 \quad\Longrightarrow\quad q = 5,

and AVC=0.1>0AVC'' = 0.1 > 0, so this is a minimum. Its value:

AVC(5)=100.5(5)+0.05(25)=102.5+1.25=8.75.AVC(5) = 10 - 0.5(5) + 0.05(25) = 10 - 2.5 + 1.25 = 8.75.

Now the check the theorem demands — marginal cost at the same output:

MC(5)=105+0.15(25)=105+3.75=8.75.MC(5) = 10 - 5 + 0.15(25) = 10 - 5 + 3.75 = 8.75. \checkmark

Equal, to the cent. Unlike the bakery in the body of this topic, this firm's AVCAVC genuinely bottoms out at a positive quantity, and MCMC cuts it there.

Step (c) — minimise average total cost. Differentiate ATCATC, remembering that the 50/q50/q term contributes 50/q2-50/q^2:

ATC(q)=50q20.5+0.1q=0.ATC'(q) = -\frac{50}{q^2} - 0.5 + 0.1q = 0.

Multiply through by q2q^2 (legitimate since q>0q > 0) to clear the fraction:

0.1q30.5q250=0q35q2500=0.0.1q^3 - 0.5q^2 - 50 = 0 \quad\Longrightarrow\quad q^3 - 5q^2 - 500 = 0.

Try q=10q = 10: 1000500500=01000 - 500 - 500 = 0. ✓ It is a root. Factor it out to be sure there are no others:

q35q2500=(q10)(q2+5q+50),q^3 - 5q^2 - 500 = (q - 10)\left(q^2 + 5q + 50\right),

and the quadratic factor has discriminant 25200=175<025 - 200 = -175 < 0, so it has no real roots. q=10q = 10 is the only positive solution. Its value:

ATC(10)=5010+100.5(10)+0.05(100)=5+105+5=15.ATC(10) = \frac{50}{10} + 10 - 0.5(10) + 0.05(100) = 5 + 10 - 5 + 5 = 15.

And marginal cost there:

MC(10)=1010+0.15(100)=15.MC(10) = 10 - 10 + 0.15(100) = 15. \checkmark

Equal again. Confirm it really is a minimum using the second-order condition derived above, ATC(q0)=MC(q0)/q0ATC''(q_0) = MC'(q_0)/q_0: here MC(q)=1+0.3qMC'(q) = -1 + 0.3q, so MC(10)=2>0MC'(10) = 2 > 0, and ATC(10)=2/10=0.2>0ATC''(10) = 2/10 = 0.2 > 0. A minimum. ✓

Step (d) — why 10 and not 5. Use ATC=AVC+AFCATC = AVC + AFC and differentiate:

ATC(q)=AVC(q)+AFC(q)=AVC(q)50q2.ATC'(q) = AVC'(q) + AFC'(q) = AVC'(q) - \frac{50}{q^2}.

At q=5q = 5, AVC(5)=0AVC'(5) = 0 by construction, but AFC(5)=50/25=2AFC'(5) = -50/25 = -2, so ATC(5)=02=2<0ATC'(5) = 0 - 2 = -2 < 0: average total cost is still falling at the output where average variable cost has already bottomed out. The falling overhead is still winning. ATCATC cannot reach its own minimum until rising AVCAVC has grown enough to cancel the still-falling AFCAFC — which happens at q=10q = 10, where AVC(10)=0.5+1=0.5AVC'(10) = -0.5 + 1 = 0.5 and AFC(10)=50/100=0.5AFC'(10) = -50/100 = -0.5 do exactly cancel. ✓

This argument used nothing specific to pottery: AFC=FC/q2AFC' = -FC/q^2 is negative at every output, so ATCATC' is strictly negative wherever AVC=0AVC' = 0. Whenever both minima are interior, the minimum of ATCATC always lies strictly to the right of the minimum of AVCAVC. A final arithmetic tie-off, using ATC=AVC+AFCATC = AVC + AFC at q=10q = 10: AVC(10)=105+5=10AVC(10) = 10 - 5 + 5 = 10 and AFC(10)=5AFC(10) = 5, and 10+5=15=ATC(10)10 + 5 = 15 = ATC(10). ✓

Where this leads

Start from a production function, apply diminishing marginal product, and the entire cost apparatus follows: a convex total cost curve, a rising marginal cost curve, a U-shaped average cost curve, and a marginal curve that slices through the average at exactly its lowest point — not by convention, but because dATCdq=MCATCq\frac{d\,ATC}{dq} = \frac{MC - ATC}{q} leaves it no choice. Along the way, opportunity cost turned an apparently profitable bakery into one that should close.

But notice what has not happened. Not once has this topic mentioned a price, a revenue, or a decision. We computed the cheapest way to make any given number of loaves; we never asked how many loaves Amara should want to make. That is the missing half, and it is where the loose end from the opening finally gets tied: when we asserted that Amara bakes 96 loaves at a price of $12, we quietly used a rule we have not proved. Look at the number. Her marginal cost is MC=q/8MC = q/8, and q=96q = 96 makes MC=12MC = 12 — exactly the price. That is not luck.

If that rule is right — produce until marginal cost equals price — then a firm's supply curve is its marginal cost curve, read sideways. Invert P=q/8P = q/8 and you get q=8Pq = 8P: at $10 a loaf Amara supplies 80 loaves, at $12 she supplies 96, at $16 she supplies 128. Add up 500 bakeries like hers and the market supplies Q=4000PQ = 4000P — an upward-sloping supply curve, of exactly the kind Supply, Demand, and Market Equilibrium assumed without justification, and sloping upward for exactly the reason found here: because the oven gets crowded.

That leaves three questions, all answered next. Why is price equal to marginal cost the profit-maximising rule, rather than a plausible-sounding guess? When should a firm producing at a loss keep going anyway, and when should it stop — a question whose answer, given that fixed costs are invisible at the margin, is not the obvious one? And what happens to Amara's $324-a-day economic loss when other people can see it too, and are free to enter or leave the industry? The apparatus is built; now it gets used, in Firms in Competitive Markets.

Check yourself

4 questions

  1. A firm's average total cost is falling at its current output. What must be true?

  2. The bakery has TC(q)=400+q2/16TC(q) = 400 + q^2/16, so its efficient scale is 80 loaves. Its landlord raises the fixed cost to 900 dollars a day. What is the new efficient scale?

  3. Why does fixed cost appear nowhere in the marginal cost function?

  4. At q=96q = 96 the bakery shows accounting profit of 176 dollars a day and economic profit of −324 dollars a day. What do those two figures together say?