Sub topic 7
Who Gains and Loses: Consumer and Producer Surplus
This chapter assumes you can read supply and demand curves, find an equilibrium, and solve linear equations. It uses surplus to measure who gains and loses when a price control binds. The next chapter turns the lost surplus into a formal deadweight loss measure.
Surplus as a measuring tool
Price controls help some people and hurt others. To compare those effects, economists use two dollar measures.
- Consumer surplus is the gap between what buyers are willing to pay and what they actually pay, added up over every unit bought. On a graph it is the area under the demand curve and above the price.
- Producer surplus is the gap between the price sellers receive and the lowest price they would accept (their marginal cost), added up over every unit sold. On a graph it is the area above the supply curve and below the price.
Total surplus is the sum of the two. A free market at equilibrium maximizes it.
The chapter uses the same market as the rest of the tutorial: Qd = 100 − 2P and Qs = 20 + 2P, with equilibrium at P = 20 and Q = 60. Rewriting each curve with price as a function of quantity gives the inverse curves:
- Inverse demand: P = 50 − Q/2. This is willingness to pay for the Qth unit.
- Inverse supply: P = Q/2 − 10. This is the marginal cost of the Qth unit.
The inverse supply curve is negative for the first 20 units. This is a quirk of the linear formula, and we keep it so the numbers match the deadweight loss calculation in the earlier code.
The baseline
At equilibrium, consumer surplus is a triangle. Its height is the gap between the demand intercept (50) and the price (20), and its base is the quantity (60):
- Consumer surplus = ½ × 60 × (50 − 20) = 900
- Producer surplus = ½ × 60 × (20 − (−10)) = 900
- Total surplus = 1800
Any binding control moves the market away from this point. The change in each group's surplus tells you who gains and who loses.
A binding ceiling at 15
At P = 15, buyers want Qd = 70 but sellers offer Qs = 50. The short side sets the quantity traded, so Q = 50. Three things change.
- A transfer to consumers. The 50 units that still sell now cost 5 less each than before, a gain of 5 × 50 = 250 for buyers. Sellers lose the same amount.
- A lost triangle for consumers. The 10 units between Q = 50 and Q = 60 are no longer bought. Buyers valued them at between 25 and 20, so they lose ½ × 10 × (25 − 20) = 25.
- A lost triangle for producers. Those same 10 units would have sold at a price of 20 against costs between 15 and 20, so producers lose ½ × 10 × (20 − 15) = 25.
The result is consumer surplus of 900 + 250 − 25 = 1125 and producer surplus of 900 − 250 − 25 = 625. Total surplus is 1750, which is 50 below the baseline. That 50 is the deadweight loss.
A binding floor at 25
At P = 25, buyers want Qd = 50 and sellers offer Qs = 70. Buyers are the short side, so Q = 50 again.
- Producers gain a transfer of 5 × 50 = 250 on the units still sold.
- Consumers pay that 250 extra.
- Each group loses a triangle of 25, from the 10 units that no longer trade.
Consumer surplus falls to 625 and producer surplus rises to 1125. Total surplus is again 1750.
Computing surplus in code
The function below finds consumer and producer surplus for any price and quantity traded. It integrates the two inverse curves: the area under demand up to Q is 50Q − Q²/4, and the area under supply up to Q is Q²/4 − 10Q.
def surplus(price, q):
"""Consumer and producer surplus when q units trade at the given price."""
value_to_buyers = 50 * q - q ** 2 / 4 # area under inverse demand, 0 to q
cost_to_sellers = q ** 2 / 4 - 10 * q # area under inverse supply, 0 to q
cs = value_to_buyers - price * q
ps = price * q - cost_to_sellers
return cs, ps
cases = {
"equilibrium": (20, 60),
"ceiling at 15": (15, 50),
"floor at 25": (25, 50),
}
for name, (price, q) in cases.items():
cs, ps = surplus(price, q)
print(f"{name}: CS={cs:.0f} PS={ps:.0f} total={cs + ps:.0f}")
# equilibrium: CS=900 PS=900 total=1800
# ceiling at 15: CS=1125 PS=625 total=1750
# floor at 25: CS=625 PS=1125 total=1750| Scenario | Price | Quantity | Consumer surplus | Producer surplus | Total surplus |
|---|---|---|---|---|---|
| Equilibrium | 20 | 60 | 900 | 900 | 1800 |
| Ceiling at 15 | 15 | 50 | 1125 | 625 | 1750 |
| Floor at 25 | 25 | 50 | 625 | 1125 | 1750 |
Where each change comes from
Every binding control splits the surplus change into the same three pieces: a rectangle that moves between groups, and a triangle that each group loses. The diagram shows the ceiling case.
The rectangle is a transfer. It changes who holds the surplus but not how much exists. The triangles are the efficiency loss, because those trades no longer happen and nobody receives that surplus.
The assumption behind the ceiling numbers
The 1125 figure for consumers assumes that the 50 available units go to the 50 buyers who value them most. That is called efficient rationing. Nothing in a ceiling guarantees it. If the 50 units go to a random subset of the 70 people who want one at price 15, the buyers' values average (50 + 15) / 2 = 32.5 instead of the 37.5 average of the top 50:
- Total value to buyers = 50 × 32.5 = 1625
- Consumer surplus = 1625 − 15 × 50 = 875
- Total surplus = 875 + 625 = 1500
- Deadweight loss = 300, not 50
The extra 250 is a misallocation loss. Goods end up with people who value them less than others who went without. A floor has a mirror-image problem: if the 50 units that sell come from random sellers rather than the lowest-cost ones, higher-cost firms stay in business and producer surplus is lower than 1125.
The 50 in the earlier calculation is therefore a lower bound on the loss from a ceiling. The next chapter and the rationing chapter return to this.
Limits of surplus as a measure
Common errors
- Treating the transfer as a loss. The 250 rectangle is not deadweight loss. Only the triangles count.
- Using the wrong quantity. Surplus under a control is computed at the traded quantity, which is the smaller of Qd and Qs. Using the quantity demanded under a ceiling overstates what buyers get.
- Assuming one side always wins. Both groups lose their triangle. A group wins overall only if its rectangle gain exceeds its triangle loss. This depends on the elasticity of the curves, which the elasticity chapter covers.
- Computing surplus for non-binding controls. A ceiling above 20 or a floor below 20 leaves surplus at 900 and 900.
Exercise
In the example market, the government sets a binding ceiling at P = 10. Find the quantity traded, consumer surplus, producer surplus, and deadweight loss, assuming efficient rationing. How much does each group's surplus change from the baseline of 900?
Show answer
At P = 10, Qd = 80 and Qs = 40, so Q = 40. Consumer surplus = (50 × 40 − 40²/4) − 10 × 40 = 1600 − 400 = 1200. Producer surplus = 10 × 40 − (40²/4 − 10 × 40) = 400 − 0 = 400. Total surplus is 1600, so the deadweight loss is 1800 − 1600 = 200. As a check, willingness to pay at Q = 40 is 30 and marginal cost is 10, so ½ × (30 − 10) × (60 − 40) = 200. Consumers gain 300 (1200 − 900) and producers lose 500 (400 − 900).
Exercise
Under the ceiling at 15, why does consumer surplus fall from 1125 to 875 if the 50 units are handed out at random among the 70 people who want one?
Show answer
Efficient rationing gives the 50 units to the buyers with the highest willingness to pay, whose values average 37.5. Random allocation draws from all 70 buyers, whose values range from 50 down to 15 and average 32.5. Total value falls from 50 × 37.5 = 1875 to 50 × 32.5 = 1625, a drop of 250, while the 750 spent stays the same. Consumer surplus therefore falls from 1125 to 875.