Sub topic 8
Measuring deadweight loss
This chapter assumes you can read supply and demand curves, solve linear equations, and find an equilibrium. Earlier chapters showed that a binding control creates a shortage or a surplus. Here you will put a number on the efficiency cost of a control.
What deadweight loss is
Deadweight loss (DWL) is the total surplus that disappears because some mutually beneficial trades no longer happen. It is not a transfer between buyers and sellers. A transfer moves surplus from one group to another and leaves the total unchanged. DWL is surplus that nobody gets.
Between the quantity actually traded and the equilibrium quantity, there are units that buyers value more than they cost to produce. A binding control blocks those trades.
The baseline market
The examples use the market from the Topic Spine.
- Demand: Qd = 100 - 2P
- Supply: Qs = 20 + 2P
- Equilibrium: P = 20, Q = 60
# Linear market: quantity demanded Qd = 100 - 2P, quantity supplied Qs = 20 + 2P
EQ_PRICE = 20
EQ_QTY = 60
def demand(p):
return 100 - 2 * p
def supply(p):
return 20 + 2 * p
print(demand(EQ_PRICE), supply(EQ_PRICE)) # 60 60To measure areas you need the curves written with price as a function of quantity. These are the inverse curves.
- Inverse demand: P = 50 - Q/2. This is the willingness to pay for the Qth unit.
- Inverse supply: P = -10 + Q/2. This is the marginal cost of the Qth unit.
The supply curve crosses the price axis at -10. That is fine for an algebra exercise, and it matters when you compute producer surplus later.
The triangle method
Follow these steps for any binding control.
- Find the quantity traded: q = min(Qd, Qs) at the controlled price. The short side of the market determines how much trades.
- Read the willingness to pay at q from inverse demand.
- Read the marginal cost at q from inverse supply.
- The vertical distance between them is the wedge. It is the gap between what the last buyer would pay and what the last unit costs.
- DWL = 0.5 × wedge × (equilibrium quantity - q).
The triangle shape comes from both curves being straight lines. Its base is the wedge, which lies along the vertical line at q. Its height is the lost quantity, which runs from q to the equilibrium quantity. For curved supply or demand the area is not exactly half of base times height, but the same wedge-times-lost-quantity logic still gives a close estimate for small distortions.
Worked example: a ceiling at 15
At P = 15:
- Qd = 100 - 30 = 70
- Qs = 20 + 30 = 50
- The shortage is 20, but only 50 units trade.
- Willingness to pay at q = 50 is (100 - 50)/2 = 25.
- Marginal cost at q = 50 is (50 - 20)/2 = 15.
- The wedge is 25 - 15 = 10, and the lost quantity is 60 - 50 = 10.
- DWL = 0.5 × 10 × 10 = 50.
A common error is to use the shortage of 20 as the lost quantity. The shortage measures unmet demand at the controlled price. The lost trades are measured from the quantity actually traded back to equilibrium, which is 10 here.
Worked example: a floor at 25
At P = 25, Qd = 50 and Qs = 70. The surplus is 20, and buyers limit trade to 50 units. The wedge is the same: willingness to pay 25, marginal cost 15. DWL is again 0.5 × 10 × 10 = 50. The symmetry comes from the linear curves and the equal distances of 5 from equilibrium. It does not hold in general.
Code that checks the triangle against surplus
The function below computes DWL with the triangle formula.
EQ_PRICE = 20
EQ_QTY = 60
def demand(p):
return 100 - 2 * p
def supply(p):
return 20 + 2 * p
def analyze(control_price, kind):
"""kind is 'ceiling' or 'floor'."""
binding = (kind == 'ceiling' and control_price < EQ_PRICE) or (
kind == 'floor' and control_price > EQ_PRICE)
if not binding:
return {'binding': False, 'price': EQ_PRICE, 'quantity': EQ_QTY,
'gap': 0, 'deadweight_loss': 0.0}
qd, qs = demand(control_price), supply(control_price)
q = min(qd, qs) # the short side of the market determines quantity traded
willingness_to_pay = (100 - q) / 2 # inverse demand at quantity q
marginal_cost = (q - 20) / 2 # inverse supply at quantity q
dwl = 0.5 * (willingness_to_pay - marginal_cost) * (EQ_QTY - q)
return {'binding': True, 'price': control_price, 'quantity': q,
'gap': abs(qd - qs), 'deadweight_loss': dwl}
print(analyze(15, 'ceiling'))
# {'binding': True, 'price': 15, 'quantity': 50, 'gap': 20, 'deadweight_loss': 50.0}
print(analyze(25, 'floor'))
# {'binding': True, 'price': 25, 'quantity': 50, 'gap': 20, 'deadweight_loss': 50.0}
print(analyze(25, 'ceiling'))
# {'binding': False, 'price': 20, 'quantity': 60, 'gap': 0, 'deadweight_loss': 0.0}A second method checks the answer. Add up consumer surplus (CS) and producer surplus (PS) before and after the control. The drop in total surplus must equal the DWL.
def welfare(price, q):
"""Consumer and producer surplus when q units trade at the given price."""
area_under_demand = 50 * q - q ** 2 / 4 # integral of 50 - Q/2
area_under_supply = -10 * q + q ** 2 / 4 # integral of -10 + Q/2
cs = area_under_demand - price * q
ps = price * q - area_under_supply
return cs, ps
base_cs, base_ps = welfare(20, 60)
print(base_cs, base_ps, base_cs + base_ps) # 900.0 900.0 1800.0
for price, kind in [(15, 'ceiling'), (25, 'floor')]:
q = min(100 - 2 * price, 20 + 2 * price)
cs, ps = welfare(price, q)
print(kind, price, 'CS', cs, 'PS', ps, 'total', cs + ps,
'loss', (base_cs + base_ps) - (cs + ps))
# ceiling 15 CS 1125.0 PS 625.0 total 1750.0 loss 50.0
# floor 25 CS 625.0 PS 1125.0 total 1750.0 loss 50.0The surplus accounting agrees with the triangle: total surplus falls from 1800 to 1750.
Who gains and who loses
The table splits the ceiling at 15 into transfers and the DWL.
| Item | Change |
|---|---|
| Consumer surplus | +225 (gain of 250 on the units still bought, loss of 25 on units no longer available) |
| Producer surplus | -275 (loss of 250 from the lower price on units still sold, loss of 25 on units no longer sold) |
| Net | -50, which is the DWL |
The rectangle of 250 is a pure transfer from sellers to buyers. The two small triangles of 25 each make up the DWL of 50. The control helps consumers who still get the good, but only if they get it. Some consumers in the shortage can't buy, so the gain is not guaranteed to every buyer.
Edge cases and caveats
- Non-binding controls. A ceiling at 25 or a floor at 15 sits on the wrong side of equilibrium and has no effect. DWL is 0.
- Which units are lost. The triangle formula assumes the units that still trade go to the buyers who value them most. Under a ceiling, queues, lotteries, or favoritism can send units to low-value buyers. Then the true loss is larger than the triangle. Time spent in line is also a cost that the triangle omits.
- Floors and wasted production. The floor calculation assumes sellers produce only the 50 units that sell. If they produce the full 70 at the higher price, the extra 20 units cost real resources and add to the loss. Government purchase programs, as in agricultural supports, can create exactly this waste.
- Size of the wedge. DWL grows with the square of the distance between the control price and equilibrium. A ceiling at 10 produces far more than twice the loss of a ceiling at 15. You will check this in the exercise.
- Elasticity. The more elastic the curves, the more quantity moves for a given price change, so the lost quantity and the DWL are larger. Inelastic curves shrink the triangle.
Exercises
Exercise
Using the market above, find the quantity traded and the deadweight loss for a price ceiling of 10.
Show answer
At P = 10, Qd = 80 and Qs = 40, so q = 40 and the shortage is 40. Willingness to pay at q = 40 is (100 - 40)/2 = 30. Marginal cost is (40 - 20)/2 = 10. The wedge is 20 and the lost quantity is 60 - 40 = 20. DWL = 0.5 × 20 × 20 = 200. This is four times the loss at a ceiling of 15, although the ceiling is only 5 lower.
Exercise
A student computes the DWL of the ceiling at 15 as 0.5 × 10 × 20 = 100, using the shortage of 20 as the base. What is wrong, and what is the correct answer?
Show answer
The shortage of 20 is the gap between Qd (70) and Qs (50) at the control price. The trades lost relative to equilibrium are 60 - 50 = 10. The correct DWL is 0.5 × 10 × 10 = 50.
Exercise
For the floor at 25, compute consumer and producer surplus using the welfare function logic and show that the total falls by the DWL.
Show answer
Only 50 units trade at P = 25. CS = 50 × 50 - 50² / 4 - 25 × 50 = 2500 - 625 - 1250 = 625. PS = 25 × 50 - (-10 × 50 + 50² / 4) = 1250 - 125 = 1125. The total is 1750, down from 1800, so the loss is 50. Consumers lose 275 and producers gain 225.