Sub topic 4
Marginal cost: what one more unit takes
This chapter assumes you can read a cost table and compute differences and ratios. You should already know that opportunity cost means the value of the best alternative you give up. The Python snippets are optional but run as shown.
What marginal cost measures
Marginal cost (MC) is the change in total cost caused by producing or doing one more unit. For a table of total costs, the marginal cost of unit q is:
MC(q) = TC(q) − TC(q − 1)
The definition has three working parts:
- It is a change. Marginal cost asks what happens to total cost if you add one unit. It does not ask what the units cost on average.
- It is forward-looking. It counts only costs that change with the decision, so it never includes money already spent that the decision cannot alter.
- It includes opportunity costs. A cost can be real without being a cash payment, such as the hour you could have spent on something else.
Marginal cost is the "cost" side of the decision rule in the next chapter: keep going while marginal benefit is at least marginal cost.
Computing marginal cost from a table
Suppose a small workshop has this total cost schedule. Quantity 0 has a cost of 100 because the workshop pays a fixed amount even when it makes nothing.
| Quantity (q) | Total cost (TC) | Marginal cost (MC) | Average cost (TC / q) |
|---|---|---|---|
| 0 | 100 | not defined | not defined |
| 1 | 140 | 40 | 140.0 |
| 2 | 185 | 45 | 92.5 |
| 3 | 235 | 50 | 78.3 |
| 4 | 295 | 60 | 73.8 |
| 5 | 370 | 75 | 74.0 |
The first unit adds 40 to total cost (140 − 100). The fifth adds 75 (370 − 295). Marginal cost belongs to the step between two quantities, so the table has no marginal cost at q = 0.
The same calculation in Python:
# total_cost[q] is the total cost of producing q units (index = quantity).
total_cost = [100, 140, 185, 235, 295, 370]
marginal_cost = [total_cost[q] - total_cost[q - 1] for q in range(1, len(total_cost))]
average_cost = [total_cost[q] / q for q in range(1, len(total_cost))]
print(marginal_cost) # [40, 45, 50, 60, 75]
print([round(a, 1) for a in average_cost])The second print shows [140.0, 92.5, 78.3, 73.8, 74.0], which matches the table.
Marginal cost is rising here: 40, 45, 50, 60, 75. Each extra unit is more expensive than the last. The next section explains why this is common.
Why marginal cost usually rises
In the short run, a firm has some inputs it cannot change quickly, such as floor space or a single oven. Adding more of the flexible inputs, such as labor, then produces less extra output each time. This is diminishing marginal returns, and a later chapter covers it in detail. If each extra worker adds less output, each extra unit of output needs more worker time, so it costs more.
Rising marginal cost also appears outside factories:
- Overtime pays a higher hourly rate, so the extra hours cost more than the regular ones.
- A farmer who plants a seventh field uses land that is less fertile or farther from the barn.
- A student's fifth hour of studying in a row costs more in tiredness and forgone sleep than the first hour.
Marginal cost does not have to rise at every quantity. At very low output it can fall, for example when the first few units let workers specialize. The rising pattern is the usual case, and it is what gives the marginal decision rule a stopping point.
Marginal cost versus average cost
Average cost is total cost divided by quantity. It answers a different question: what is the typical cost per unit so far? The two measures are linked by one rule:
- If the marginal cost of the next unit is below the current average, the average falls.
- If the marginal cost of the next unit is above the current average, the average rises.
- Marginal cost crosses the average cost curve at the lowest point of average cost.
The logic is the same as with exam grades. A new score below your current average pulls the average down, and a new score above it pulls the average up. In the table, the fourth unit has MC = 60, below the previous average of 78.3, so average cost falls to 73.8. The fifth has MC = 75, above 73.8, so average cost rises to 74.0.
You can check the rule directly in code:
total_cost = [100, 140, 185, 235, 295, 370]
for q in range(2, len(total_cost)):
mc = total_cost[q] - total_cost[q - 1]
previous_average = total_cost[q - 1] / (q - 1)
direction = "falls" if mc < previous_average else "rises"
print(f"q={q}: MC={mc}, previous average={previous_average:.1f}, average {direction}")The output is:
q=2: MC=45, previous average=140.0, average falls
q=3: MC=50, previous average=92.5, average falls
q=4: MC=60, previous average=78.3, average falls
q=5: MC=75, previous average=73.8, average risesWhat goes into marginal cost
Marginal cost is built from the costs that change when you add a unit. The cost categories are covered in more depth in a later chapter, but a first sorting helps now.
- Variable costs change with output: materials, hourly labor, energy used per unit. They belong in marginal cost.
- Fixed costs stay the same whatever the output: rent, a yearly license. They do not belong in marginal cost, because adding a unit does not change them. In the table, the 100 sits inside every total, but it cancels out of every difference.
- Opportunity costs are the value of what the resource would have earned elsewhere. They belong in marginal cost whenever the unit uses a scarce resource.
A worked example: a baker can make one more batch of 20 loaves tonight. The flour and yeast cost 12. An assistant paid by the hour for the extra time costs 20. If the baker did not bake, the oven and the baker's time could have produced a catering order worth 30 in profit. The marginal cost of the batch is:
12 + 20 + 30 = 62
If the loaves sell for a total of 55, the batch looks profitable on cash alone (55 − 32 = 23), but it loses once the forgone catering order is counted (55 − 62 = −7). Leaving out the opportunity cost gives the wrong answer.
Marginal cost can also be a lumpy, step-like quantity. If a bakery needs a second oven after 200 loaves, the loaf that triggers the purchase has a very large marginal cost. This is called an incremental cost, and it is the right figure to use when the decision is about a block of units rather than a single one.
Marginal cost in continuous settings
The table method works when units are whole. If output can be adjusted smoothly, such as liters of fuel or hours of work, marginal cost is the rate of change of total cost. In calculus terms it is the derivative dTC/dq. For example, if TC(q) = 100 + 30q + q², then MC(q) = 30 + 2q. At q = 10, one more unit costs about 50.
You do not need calculus for this tutorial. The idea is the same in both settings: look at how total cost responds to a small step. In a table, the step is one unit.
Using marginal cost in a decision
Once you have marginal cost, you compare it with what one more unit brings in. For a firm that sells at a fixed price, each extra unit brings in the price, so the comparison is price against MC.
total_cost = [100, 140, 185, 235, 295, 370] # includes a fixed cost of 100
marginal_cost = [total_cost[q] - total_cost[q - 1] for q in range(1, len(total_cost))]
price = 55 # marginal revenue of each extra unit
# Marginal rule: add units while marginal revenue covers marginal cost.
q_rule = 0
for mc in marginal_cost:
if mc <= price:
q_rule += 1
else:
break
# Check by brute force: pick the quantity with the highest total profit.
def profit(q):
return price * q - total_cost[q]
q_best = max(range(len(total_cost)), key=profit)
assert q_rule == q_best == 3
print(q_rule, profit(q_rule)) # 3 -70The workshop stops at 3 units, because the fourth costs 60 and brings in only 55. The best profit is −70, a loss. Producing nothing would lose 100, the fixed cost, so producing 3 units is still the better choice. The fixed cost of 100 did not change which quantity was best. It only decided whether the whole business is profitable overall.
Common errors with marginal cost
- Using average cost as if it were marginal cost. At 4 units the average is 73.8, but the next unit costs 75. Deciding on the average hides what the next unit does.
- Including fixed or sunk costs. A cost that does not change with the decision has no place in MC. The cost of equipment you have already bought is a typical example.
- Leaving out opportunity costs. This is the baker's mistake above: counting only cash outlays understates the true cost.
- Treating marginal cost as constant. Assuming that the next unit costs the same as the first works for small changes but fails across a wide range, where marginal cost rises.
- Ignoring costs that fall on others. A factory's marginal cost to itself may exclude pollution that harms neighbors. The private marginal cost is then lower than the cost to society.
Summary of the working model
- Marginal cost is TC(q) − TC(q − 1), the extra cost of one more unit.
- It counts only costs that change with the decision, including opportunity costs, and excludes fixed and sunk costs.
- It usually rises as output grows, because of diminishing returns.
- It pulls average cost down when it is below the average and up when it is above it.
- It is the number you compare with marginal benefit or marginal revenue to decide whether to produce one more unit.
Exercise
A bike repair shop has total costs of 60 for 0 repairs, 90 for 1, 125 for 2, 165 for 3, and 215 for 4. (a) Find the marginal cost of each repair. (b) The shop earns 45 per repair. How many repairs should it do, using the marginal rule? (c) Is the shop's average cost rising or falling between 3 and 4 repairs, and how do you know from the marginal cost?
Show answer
(a) The marginal costs are 90 − 60 = 30, 125 − 90 = 35, 165 − 125 = 40, and 215 − 165 = 50. (b) Add repairs while MC is at most 45. Repairs 1, 2 and 3 cost 30, 35 and 40, so they pass. Repair 4 costs 50 and fails, so the shop should do 3 repairs. (c) The average cost at 3 repairs is 165 / 3 = 55. The fourth repair has MC = 50, which is below 55, so the average falls to 215 / 4 = 53.75.
Exercise
A freelancer is offered a 4-hour job paying 200. Materials cost 30. Taking the job means turning down a different 4-hour job that would pay 150 with no materials cost. What is the marginal cost of taking the job, and should the freelancer accept?
Show answer
The marginal cost is the materials plus the forgone alternative: 30 + 150 = 180. The job pays 200, which is more than 180, so the freelancer should accept. The gain is 200 − 180 = 20 compared with the next-best option. Looking at the 30 of materials alone would have made the job look much more profitable than it is.