Sub topic 5
Consumer surplus: the gap between value and price
This chapter assumes you can read a linear demand curve of the form P = a − bQ, find a market equilibrium, and compute the area of a triangle or trapezoid. Earlier chapters introduced willingness to pay and the demand curve. Here we turn them into a measurement of what buyers gain from trading.
What consumer surplus is
Consumer surplus is the difference between the most a buyer would pay for a unit and the price the buyer actually pays. It is a net gain. A buyer who values a concert ticket at 90 and pays 40 keeps 50 of value they would not have had without the trade.
For one unit:
- Consumer surplus = willingness to pay − price paid.
For a whole market, you add this gap across every unit sold. The demand curve is a ladder of willingness to pay, so the market's consumer surplus is the area below the demand curve and above the price, out to the quantity actually traded.
Two points follow from this definition.
- Surplus is measured in money units, but it is not money anyone receives. It is value that buyers get beyond what they paid.
- The last buyer who still buys, the marginal buyer, has willingness to pay equal to the price. Their surplus is zero. They are indifferent between buying and not buying.
A discrete example
Suppose five people each want one unit. Their willingness to pay is 90, 70, 55, 45 and 30. At a price of 40, the first four buy and the fifth does not, because 30 is less than 40.
| Buyer | Willingness to pay | Price | Surplus |
|---|---|---|---|
| A | 90 | 40 | 50 |
| B | 70 | 40 | 30 |
| C | 55 | 40 | 15 |
| D | 45 | 40 | 5 |
| E | 30 | 40 | does not buy (0) |
Consumer surplus is 50 + 30 + 15 + 5 = 100. If the price rises to 50, buyer D drops out. The surplus becomes 40 + 20 + 5 = 65. The price rise did two things at once: it took surplus from the buyers who stayed (10 each from A, B and C, so 30), and it removed buyer D's surplus of 5 entirely.
That split is the key to everything in later chapters. A price change affects consumer surplus through a price effect on units still bought and a quantity effect on units no longer bought.
From steps to a smooth curve
With many buyers, the steps of the ladder become small and the demand curve looks smooth. The sum of gaps then becomes an area.
For a linear demand curve P = a − bQ and a market price p:
- Find the quantity bought: Q = (a − p) / b.
- The curve starts at the intercept a on the price axis. This is the choke price, the price at which quantity demanded falls to zero.
- Consumer surplus is the triangle with height (a − p) and base Q.
So CS = ½ × Q × (a − p). Substituting Q gives a form that needs only the price:
CS = (a − p)² / (2b)
The squared term matters. Consumer surplus does not fall in proportion to a price rise. It falls faster than the price rises.
Worked example
Use the market from this tutorial: demand P = 100 − 2Q and supply P = 10 + Q. Setting 100 − 2Q = 10 + Q gives Q = 30 and P = 40.
- Height of the triangle: 100 − 40 = 60.
- Base: 30.
- Consumer surplus: ½ × 30 × 60 = 900.
The following program computes consumer surplus for both the discrete and the linear case and shows how it changes with price.
def cs_discrete(values, price):
"""Sum of (willingness to pay - price) over buyers who buy."""
return sum(v - price for v in values if v >= price)
def cs_linear(a, b, price):
"""Consumer surplus for demand P = a - b*Q at a given price."""
if price >= a:
return 0.0 # price at or above the choke price: nobody buys
q = (a - price) / b
return 0.5 * q * (a - price)
values = [90, 70, 55, 45, 30]
print(cs_discrete(values, 40)) # 100
print(cs_discrete(values, 50)) # 65
a, b = 100, 2
for p in (50, 40, 30):
print(p, cs_linear(a, b, p))
# 50 625.0
# 40 900.0
# 30 1225.0Both functions use the same logic. The first sums the gaps one by one, and the second uses the area formula.
What a price change does to consumer surplus
The program shows how consumer surplus responds to price in this market.
| Price | Quantity bought | Consumer surplus |
|---|---|---|
| 50 | 25 | 625 |
| 40 | 30 | 900 |
| 30 | 35 | 1225 |
When the price falls from 40 to 30, consumer surplus rises by 325. That area is a trapezoid, and it splits into two parts:
- A rectangle of 30 units × 10 = 300. These are units buyers already bought, now cheaper. This is the price effect.
- A small triangle of ½ × 5 × 10 = 25. These are the five new units bought, each worth more than 30 but less than 40 to its buyer. This is the quantity effect.
Check: 300 + 25 = 325, which matches 1225 − 900.
The diagram below shows how these parts relate.
Why the demand curve is a marginal benefit
The surplus area only makes sense because each point on the demand curve has a precise meaning. The height of the curve at quantity Q is the most that the Qth buyer would pay, which is the benefit of that marginal unit to them. Reading demand as marginal benefit lets us say that the area under the curve up to Q is total benefit, and that consumer surplus is total benefit minus total spending.
- Total benefit at Q = 30 in our market is the area under demand from 0 to 30: the average of 100 and 40, which is 70, times 30, giving 2100.
- Total spending is 40 × 30 = 1200.
- Consumer surplus is 2100 − 1200 = 900.
This agrees with the triangle calculation. Use whichever route is easier. The "total benefit minus spending" route is useful when demand is not a straight line, or when you need the surplus of a quantity that is not the equilibrium quantity.
Common errors
- Measuring the height from the axis. The triangle's height is the choke price minus the market price, not the choke price alone. Using 100 instead of 60 in the example gives 1500, which is wrong.
- Counting the whole area under demand as surplus. That area is total benefit. Spending must be subtracted.
- Using the equilibrium quantity when the market is not at equilibrium. If a price control limits quantity, the triangle formula no longer applies directly. You need the quantity actually traded and a rectangle plus a triangle, as in the price ceiling case the next chapters cover.
- Forgetting the zero-surplus boundary. If the price is at or above the choke price, nobody buys and consumer surplus is zero. A formula that returns a negative number has gone past this boundary, so guard against it as
cs_lineardoes. - Treating surplus as cash. Buyers do not receive 900. It is the value they enjoy beyond their payments, and it is the right quantity to compare across policies.
Edge cases and caveats
- Price of zero. A free good has surplus equal to the entire area under demand. For our curve that is ½ × 50 × 100 = 2500, since demand reaches zero quantity at P = 100 and quantity demanded is 50 at P = 0.
- Discrete goods. For a handful of buyers, the staircase sum is the exact answer, and the triangle is an approximation. With many buyers the difference is negligible.
- Non-linear demand. The area must be found by integration or by summing thin slices. The idea is unchanged: add up willingness to pay minus price over units bought.
- Willingness to pay depends on income. A buyer with less money states a lower willingness to pay for the same enjoyment. Surplus measured in money therefore weights richer buyers more heavily. A later chapter discusses this limit.
- Who gets the units. The triangle assumes that the units go to the buyers who value them most. If a market allocates units some other way, such as by queueing, the real consumer surplus can be lower than the area suggests.
Summary of the method
- Read the demand curve as willingness to pay for each successive unit.
- Find the quantity traded at the market price.
- Subtract the price from the willingness to pay of each unit bought, and add the gaps. For linear demand, this is the area of a triangle between the demand curve and the price line.
- To see the effect of a price change, compare the two areas, and split the difference into a price effect and a quantity effect.
Exercise
Demand is P = 80 − 4Q. The market price is 20. Find the quantity bought and the consumer surplus. Then find the consumer surplus if the price rises to 40, and state how much of the loss comes from the price effect and how much from the quantity effect.
Show answer
At P = 20, Q = (80 − 20) / 4 = 15. Consumer surplus = ½ × 15 × (80 − 20) = ½ × 15 × 60 = 450. At P = 40, Q = (80 − 40) / 4 = 10, and consumer surplus = ½ × 10 × 40 = 200. The loss is 250. The price effect is the rectangle on the 10 units still bought: 10 × (40 − 20) = 200. The quantity effect is the triangle on the 5 units lost: ½ × 5 × 20 = 50. Check: 200 + 50 = 250.
Exercise
Four buyers have willingness to pay of 12, 9, 7 and 3. At what prices does the consumer surplus equal 8, and which buyers purchase at that price?
Show answer
Try a price of 7. Buyers with 12, 9 and 7 buy, giving gaps of 5, 2 and 0, so the surplus is 7. Try a price of 6: the gaps are 6, 3 and 1, so the surplus is 10. Try a price of 6.5 for a middle value: 5.5 + 2.5 + 0.5 = 8.5. The surplus equals 8 when 3p is such that (12 + 9 + 7) − 3p = 8, so 28 − 3p = 8 and p = 20/3, about 6.67. At that price, buyers with willingness to pay of 12, 9 and 7 buy. The buyer at 3 does not.