Sub topic 8
The deadweight loss triangle of a tax
This chapter assumes you can read a supply and demand diagram, find an equilibrium, and compute the area of a triangle. It also assumes you know consumer and producer surplus and the idea of a tax wedge. Here you will measure exactly what a per-unit tax destroys.
The setup
Use the market from the earlier chapters. Demand is P = 100 − Q and supply is P = 20 + Q.
- Equilibrium quantity is Q = 40 and equilibrium price is P = 60.
- Consumer surplus is ½ × 40 × 40 = 800.
- Producer surplus is also 800.
- Total surplus is 1,600.
Now impose a tax of t = 10 per unit. It does not matter whether the law collects it from buyers or sellers. The tax creates a gap between what the buyer pays and what the seller keeps.
Finding the new equilibrium
After the tax, a trade happens only if the buyer's price minus the seller's price equals t. In the linear model, solve for the quantity where the demand price exceeds the supply price by exactly 10:
(100 − Q) − (20 + Q) = 10, so Q = 35.
| Quantity | Value |
|---|---|
| Taxed quantity | 35 |
| Price the buyer pays | 65 |
| Price the seller keeps | 55 |
| Tax revenue (10 × 35) | 350 |
The buyer pays 5 more than before, and the seller receives 5 less. The tax is split evenly because the two curves have the same slope.
Where the surplus goes
Compare the market before and after the tax.
| Piece | Before | After |
|---|---|---|
| Consumer surplus | 800 | 612.5 |
| Producer surplus | 800 | 612.5 |
| Tax revenue | 0 | 350 |
| Total | 1,600 | 1,575 |
Consumers lose 187.5 and producers lose 187.5, which is 375 in total. The government gains 350. The 25 that nobody gets is the deadweight loss.
The revenue is a transfer. It changes who holds the money, and the government can spend it or hand it back. The deadweight loss is different, because those trades simply stop happening.
Why it is a triangle
Take the units between 35 and 40. For each one, a buyer is willing to pay more than the seller's cost. Before the tax, that difference was a gain from trade. After the tax, the wedge of 10 exceeds the gain on these units, so they are not traded.
The lost gain on the last unit (the 40th) is zero, because the buyer's value equals the seller's cost there. The lost gain on the 36th unit is just under 10 minus the small margin. The losses shrink steadily from the wedge size to zero, which gives a triangle with these dimensions:
- The base is the tax, t = 10, measured vertically between the buyer price and the seller price at Q = 35.
- The height is the drop in quantity, Q* − Q_t = 5, measured horizontally.
Area = ½ × 10 × 5 = 25. This triangle is often called the Harberger triangle.
A general formula for linear curves
Let demand be P = a − bQ and supply be P = c + dQ.
- The taxed quantity is Q_t = (a − c − t) / (b + d).
- The quantity drop is Q* − Q_t = t / (b + d).
- The deadweight loss is ½ × t × t/(b + d) = t² / (2(b + d)).
Check with the example: 100 / (2 × 2) = 25.
This formula shows two things at once. The loss depends on the slopes through b + d, and it depends on the square of t. The next chapters build on both points.
Computing it in code
The script below computes every piece from the decomposition table, so you can check that the pieces add up. It uses the surplus triangle formulas directly instead of the shortcut.
def tax_surplus_breakdown(a, b, c, d, t):
"""Demand: P = a - b*Q. Supply: P = c + d*Q. Per-unit tax t."""
q_star = (a - c) / (b + d)
p_star = a - b * q_star
cs_before = 0.5 * (a - p_star) * q_star
ps_before = 0.5 * (p_star - c) * q_star
q_t = (a - c - t) / (b + d)
p_buyer = a - b * q_t
p_seller = p_buyer - t
cs_after = 0.5 * (a - p_buyer) * q_t
ps_after = 0.5 * (p_seller - c) * q_t
revenue = t * q_t
dwl_by_subtraction = (cs_before + ps_before) - (cs_after + ps_after + revenue)
dwl_by_triangle = 0.5 * t * (q_star - q_t)
dwl_by_formula = t**2 / (2 * (b + d))
return {
"cs_after": cs_after,
"ps_after": ps_after,
"revenue": revenue,
"dwl_by_subtraction": dwl_by_subtraction,
"dwl_by_triangle": dwl_by_triangle,
"dwl_by_formula": dwl_by_formula,
}
print(tax_surplus_breakdown(a=100, b=1, c=20, d=1, t=10))
# cs_after=612.5, ps_after=612.5, revenue=350.0, and all three DWL values are 25.0All three loss calculations agree. If you change the slopes or the tax and they stop agreeing, you have an arithmetic error.
The elasticity form
Economists often do not know the slopes. They know elasticities, which describe the percentage response of quantity to price. A common approximation for small taxes is:
DWL ≈ ½ × t² × (Q/P) × (ed × es) / (ed + es)
Here ed is the absolute value of demand elasticity at equilibrium, es is supply elasticity, and Q and P are the pre-tax equilibrium values. In the example, ed = es = 60 / (1 × 40) = 1.5, so:
½ × 100 × (40/60) × (2.25 / 3) = 25.
def dwl_from_elasticities(t, q_star, p_star, e_demand, e_supply):
"""DWL = 0.5 * t^2 * (Q/P) * (ed*es)/(ed+es), linear-curve approximation."""
return 0.5 * t**2 * (q_star / p_star) * (e_demand * e_supply) / (e_demand + e_supply)
print(dwl_from_elasticities(10, 40, 60, 1.5, 1.5)) # 25.0
print(dwl_from_elasticities(20, 40, 60, 1.5, 1.5)) # 100.0The product-over-sum term is large when both elasticities are large. It is small when either one is near zero. This is the algebra behind the idea that markets with more flexible buyers and sellers lose more.
Common errors
- Using the revenue rectangle as the loss. The rectangle of 350 is a transfer. Only the triangle is lost.
- Using the wrong base. The base is the full tax wedge, not the change in the buyer price alone.
- Using the new quantity in the elasticity form. The formula above uses pre-tax equilibrium values. Mixing in post-tax values gives a different and wrong approximation.
- Treating the tax as free if the revenue is spent well. The 25 is lost even if the government uses the 350 productively. Whether the spending is worth the loss is a separate question.
- Assuming who is legally taxed changes the loss. It does not. The statutory side affects the paperwork and the visible price, not the quantity or the triangle.
Checking your understanding
Exercise
Demand is P = 120 − Q and supply is P = 30 + 2Q. A tax of 9 per unit is imposed. Find the new quantity, the buyer and seller prices, the tax revenue, and the deadweight loss.
Show answer
The original equilibrium is Q = (120 − 30) / 3 = 30 and P = 90. With the tax, Q_t = (120 − 30 − 9) / 3 = 27. The buyer price is 120 − 27 = 93 and the seller price is 93 − 9 = 84. Revenue is 9 × 27 = 243. The deadweight loss is ½ × 9 × (30 − 27) = 13.5, which matches t² / (2(b + d)) = 81 / 6 = 13.5.
Exercise
In the chapter's market (P = 100 − Q, P = 20 + Q), the tax is raised from 10 to 15. What happens to the revenue and to the deadweight loss?
Show answer
With t = 15, Q_t = (80 − 15) / 2 = 32.5. Revenue is 15 × 32.5 = 487.5, up from 350. The deadweight loss is 225 / 4 = 56.25, up from 25. The tax rose by 50% and the loss rose by about 125%, because the loss grows with t squared.