Sub topic 6
Measuring the deadweight loss
This chapter assumes you can read supply and demand curves, know that surplus is the area between a curve and the price, and can solve two linear equations. It uses the numbers from the running example: inverse demand P = 100 − Q, private marginal cost P = 20 + Q, and a constant external cost of 10 per unit.
What the deadweight loss is
The deadweight loss (DWL) is the surplus that society gives up because the quantity traded differs from the efficient quantity. With an uncorrected negative externality, the market produces units whose marginal social cost is higher than their marginal benefit. Each of those units destroys value.
Two quantities define the loss:
- The market quantity Q_m, where marginal private benefit equals marginal private cost (MPB = MPC).
- The efficient quantity Q*, where marginal social benefit equals marginal social cost (MSB = MSC).
For a negative externality, MSC = MPC + MEC, so Q is smaller than Q_m. The DWL is the area between the MSC curve and the demand curve, from Q to Q_m.
The geometry on the diagram
The diagram plots the three curves for the example. Demand is the MSB curve, because the good has no external benefit. The MSC curve sits exactly 10 above the MPC curve.
Demand crosses MPC at Q = 40, which is the market outcome. Demand crosses MSC at Q = 35, which is the efficient outcome. Between 35 and 40 the MSC line lies above the demand line. At Q = 35 the gap is 0. At Q = 40 the gap is 10, because MSC = 70 and MSB = 60. The gap grows linearly, so the lost surplus is a triangle.
Computing the triangle
A triangle's area is one half of base times height.
- Base: Q_m − Q* = 40 − 35 = 5 units.
- Height: the vertical gap at Q_m, which equals the marginal external cost, 10.
- Area: 0.5 × 5 × 10 = 25.
The shortcut DWL = 0.5 × MEC × (Qm − Q) works only when MEC is constant and both curves are straight lines. Otherwise you need the general definition: the integral of (MSC − MSB) from Q to Qm.
# Deadweight loss by integrating the gap between MSC and MSB.
a, b = 100, 1 # inverse demand: P = a - b*Q
c, d = 20, 1 # private marginal cost: P = c + d*Q
e = 10 # constant marginal external cost
def msb(q):
return a - b * q
def msc(q):
return c + d * q + e
q_market = (a - c) / (b + d)
q_efficient = (a - c - e) / (b + d)
def integrate(f, lo, hi, steps=10_000):
"""Midpoint rule; exact for straight lines."""
width = (hi - lo) / steps
return sum(f(lo + (i + 0.5) * width) for i in range(steps)) * width
dwl = integrate(lambda q: msc(q) - msb(q), q_efficient, q_market)
print(round(dwl, 6)) # 25.0The numerical integral and the triangle formula agree. The integral version keeps working if you replace msc with a curved function, such as one where external cost rises with output.
A formula that needs no quantities
For linear curves with constant MEC you can skip the two equilibrium calculations. The quantity gap is Q_m − Q* = e / (b + d), so:
DWL = 0.5 × e² / (b + d)
With e = 10, b = 1, and d = 1, this gives 0.5 × 100 / 2 = 25. Two things follow from the formula:
- The DWL grows with the square of the external cost. Doubling e quadruples the loss. Small externalities cause small losses, and large ones cause much larger losses.
- The DWL shrinks as the curves get steeper (a larger b + d). Steep curves mean quantity responds little to price, so the market misallocates fewer units.
Where the loss comes from
Think of the units between Q* and Q_m one at a time. Take the 38th unit. A buyer values it at 100 − 38 = 62. The producer's private cost is 20 + 38 = 58, so the trade happens, and the two parties split a private gain of 4. Society also bears the 10 external cost, so the net social value is 62 − 58 − 10 = −6. The market makes this trade and society loses 6.
Adding up the net social value of every unit from 35 to 40 gives the triangle:
| Unit | MSB (demand) | MSC | Net social value |
|---|---|---|---|
| 36 | 64 | 66 | −2 |
| 37 | 63 | 67 | −4 |
| 38 | 62 | 68 | −6 |
| 39 | 61 | 69 | −8 |
| 40 | 60 | 70 | −10 |
The table samples one point per unit, so the sum is 30 and not 25. The difference is a rectangle-versus-triangle approximation: each row uses the gap at the end of a one-unit step, while the true curve rises smoothly across each step. Using the midpoints of each step (−1, −3, −5, −7, −9) gives exactly 25.
Decomposing the effect of correcting the market
Moving from Q_m = 40 down to Q* = 35 has two parts. Both are worth separating, because people often confuse the DWL with the total external cost.
- Private surplus lost. Buyers and sellers give up the 5 units. Their private gain on those units is the area between demand and MPC, the integral of (80 − 2Q) from 35 to 40, which equals 25.
- External cost avoided. Society no longer bears 10 on each of those 5 units, which is 50.
The net gain is 50 − 25 = 25, which matches the DWL. The DWL is therefore the net improvement from correcting the market, and not the external cost itself.
| Quantity | Total external cost | Meaning |
|---|---|---|
| Q_m = 40 | 400 | What the market imposes on third parties |
| Q* = 35 | 350 | What remains at the efficient outcome |
| Difference | 50 | Harm avoided, before subtracting 25 of lost private surplus |
A general formula for any quantity
You can measure the loss at any quantity, not only at Q_m. For linear curves, if the market ends up at quantity q, the surplus loss relative to the efficient point is:
DWL(q) = 0.5 × (b + d) × (q − Q*)²
This holds in both directions, which matters for the next chapters on taxes. At q = 40 it gives 0.5 × 2 × 25 = 25. At q = 30 it also gives 25. A policy that cuts output too far destroys surplus just as an uncorrected market does.
def dwl_at(q, a=100, b=1, c=20, d=1, e=10):
"""Loss in total surplus at quantity q, relative to the efficient quantity."""
q_star = (a - c - e) / (b + d)
return 0.5 * (b + d) * (q - q_star) ** 2
for q in (40, 35, 30, 20):
print(q, dwl_at(q))
# 40 25.0
# 35 0.0
# 30 25.0
# 20 225.0At q = 20, the loss is 225. The loss is quadratic in the distance from Q*, so large overcorrections are costly.
Edge cases and common errors
- Positive externalities. The same triangle appears, but on the other side. MSB lies above MPB, so Q is larger than Qm. The DWL is the area between MSB and MSC from Qm to Q. The formula is the same with MEB (marginal external benefit) in place of MEC.
- Non-constant external cost. If marginal external cost rises with output, the MSC curve is steeper than MPC, and the gap at Qm is not equal to the gap at other quantities. Use the integral. The height of the triangle is the MEC *at Qm, but the MEC to use for a tax is the one at Q.
- Wrong height. The triangle's height is the gap between MSC and MSB at Q_m. If MEC is constant, that gap is the external cost, but it is not the price difference between the market price and the efficient price. Here the market price is 60, and the efficient buyer price is 65.
- Mixing up curves. Demand is MSB only when no external benefit exists. If you draw demand and call it MPB, and the externality is a cost, then MSB and MPB coincide, and only the cost curve shifts.
- Units. The DWL is a total in money units (for example, dollars per period), because it integrates a per-unit gap over units. A gap of 10 per unit is not a DWL of 10.
- Zero loss. If MEC is 0, then Q_m = Q* and the DWL is 0. A positive MEC does not always mean a large loss. If the curves are nearly vertical, the quantity gap is tiny.
Exercises
Exercise
Inverse demand is P = 120 − Q and private marginal cost is P = 30 + 2Q. Each unit imposes a constant external cost of 15. Find the market quantity, the efficient quantity, and the deadweight loss.
Show answer
Market: 120 − Q = 30 + 2Q, so Q_m = 30. Efficient: 120 − Q = 30 + 2Q + 15, so 3Q = 75 and Q* = 25. The quantity gap is 5 and the height is 15, so DWL = 0.5 × 5 × 15 = 37.5. Check with the formula: 0.5 × 15² / (1 + 2) = 112.5 / 3 = 37.5.
Exercise
In the running example (e = 10, b = d = 1), a regulator over-corrects and limits output to 25 units. What is the deadweight loss relative to the efficient outcome, and why is it positive even though external cost has fallen?
Show answer
DWL(25) = 0.5 × (1 + 1) × (25 − 35)² = 100. It is positive because each unit between 25 and 35 is worth more to buyers than its full social cost (MSB > MSC), so removing those units destroys surplus. Falling external cost does not matter if the avoided harm is smaller than the lost value.
Exercise
Why does doubling the marginal external cost quadruple the deadweight loss in the linear case?
Show answer
Because DWL = 0.5 × e² / (b + d). Doubling e doubles both the base of the triangle (the quantity gap e / (b + d)) and its height (e). Area scales with base times height, so it grows by a factor of 4.