Sub topic 5
Prices above equilibrium: surpluses
This chapter assumes you can read a price-quantity graph, solve a linear equation for one variable, and accept that buyers and sellers respond to prices. It also assumes you know what demand and supply curves are and what equilibrium means: the price where quantity demanded equals quantity supplied.
Here you will define a surplus, compute its size, and see which quantity actually gets traded. You will also see the edge cases where the linear formulas break down, and why surpluses are one half of the adjustment story. The chapter that follows covers how prices move to remove them.
What a surplus is
A surplus, also called excess supply, exists at a price where the quantity supplied is greater than the quantity demanded. At such a price, sellers want to sell more units than buyers want to buy.
Throughout this tutorial we use one running market:
- Demand: Qd = 100 - 2P
- Supply: Qs = -20 + 4P
- Equilibrium: P = 20, Q = 60
The surplus at any price P is:
surplus(P) = Qs(P) - Qd(P)
For this market, surplus(P) = (-20 + 4P) - (100 - 2P) = 6P - 120 = 6(P - 20). The result depends on how far the price is above equilibrium. Each extra dollar above 20 adds 6 units to the surplus. The 6 is the sum of the two slopes, 2 from demand and 4 from supply. Steeper curves (in quantity-per-dollar terms) produce a larger surplus for the same price gap.
Why a high price produces a surplus
Two forces open the gap as the price rises above equilibrium:
- Buyers drop out or buy less. Along the demand curve, a higher price lowers the quantity demanded. Some buyers find the good no longer worth its price.
- Sellers offer more. Along the supply curve, a higher price raises the quantity supplied. Higher-cost producers now find it profitable to produce, and existing producers expand.
At the equilibrium price these two forces balance. Above it, supply keeps rising while demand keeps falling, so the two curves separate.
The table below shows the running market at several prices above equilibrium.
| Price | Qd | Qs | Surplus (Qs - Qd) | Units actually traded |
|---|---|---|---|---|
| 20 | 60 | 60 | 0 | 60 |
| 22 | 56 | 68 | 12 | 56 |
| 25 | 50 | 80 | 30 | 50 |
| 30 | 40 | 100 | 60 | 40 |
The last column matters. It is the next section's subject.
The short side rules: quantity traded
At a price above equilibrium, only Qd units are bought, because no one can be forced to buy. Sellers wanted to sell Qs, but they can sell only to buyers who show up. The quantity traded is therefore:
traded = min(Qd, Qs)
Above equilibrium, Qd is smaller, so Qd is the quantity traded. At P = 30, sellers produce or offer 100 units, but only 40 change hands. The remaining 60 units are the surplus. They sit unsold as inventory, spoil, or are withheld from the market.
This leads to a common error: reading the quantity traded from the supply curve at a high price. Supply tells you what sellers are willing to offer, not what they get to sell. When the price is above equilibrium, the demand side limits trade, so you read the traded quantity from the demand curve.
Computing surpluses in code
The function below handles the case where the linear formulas would give nonsensical negative quantities. A price high enough that the demand formula goes below zero means no one buys, so Qd is zero, not negative. Likewise, a very low price could make Qs negative, which means nobody supplies.
def market_at_price(price):
qd = max(0, 100 - 2 * price)
qs = max(0, -20 + 4 * price)
traded = min(qd, qs)
gap = qs - qd # positive: surplus, negative: shortage
return qd, qs, traded, gap
print("price qd qs traded gap")
for p in (20, 22, 25, 30, 50, 60):
qd, qs, traded, gap = market_at_price(p)
print(p, qd, qs, traded, gap)The output is:
price qd qs traded gap
20 60 60 60 0
22 56 68 56 12
25 50 80 50 30
30 40 100 40 60
50 0 180 0 180
60 0 220 0 220Look at the rows for 50 and 60. At P = 50 the demand formula reaches zero, which is the choke price, the lowest price at which no one buys. Above it, nothing is traded at all, and the surplus equals the entire quantity supplied. Without the max(0, ...) clipping, the price of 60 would give Qd = -20 and a surplus of 240, which overstates the real gap.
Seeing the surplus resolve
When a surplus exists and sellers can adjust prices, competition among them usually pushes the price down. Each seller who holds unsold units has a reason to undercut the others, because a sale at a lower price beats no sale. As the price falls, two things happen together:
- Quantity demanded rises, because buyers who were priced out return.
- Quantity supplied falls, because the least profitable sellers cut back.
Both effects shrink the gap until it reaches zero at the equilibrium price.
A simple rule makes this concrete. Suppose the price changes each round by a fixed fraction of excess demand, where excess demand is Qd - Qs. When there is a surplus, excess demand is negative, so the price falls.
price = 30.0
for step in range(8):
qd = 100 - 2 * price
qs = -20 + 4 * price
print(step, round(price, 2), round(qd, 2), round(qs, 2), round(qs - qd, 2))
price += 0.05 * (qd - qs)For this market, excess demand is 120 - 6P, so each round maps the price P to 0.7P + 6. That means the distance from equilibrium, P - 20, is multiplied by 0.7 each round. The price runs 30, 27, 24.9, 23.43, and so on, closing in on 20 from above without crossing it. The surplus shrinks by the same factor, from 60 to 42 to 29.4 and onward.
The factor of 0.7 comes from the adjustment speed (0.05) times the combined slope (6): 1 - 0.05 × 6 = 0.7. A later chapter on stability explains why a larger speed could overshoot and why some markets do not converge at all. For now, note that this particular rule never overshoots.
When the surplus does not resolve
The loop above has a hidden assumption: prices are free to fall. If something stops the price from falling, the surplus persists. The most common cause is a price floor, a legal minimum price. A floor set above equilibrium is called binding, because it holds the price at a level the market would otherwise leave.
The code below adds a floor of 25 to the adjustment rule and tracks the stock of unsold units, assuming the surplus accumulates as inventory.
def simulate(start, floor=None, steps=6, speed=0.05):
price = start
stock = 0.0
for step in range(steps):
qd = max(0, 100 - 2 * price)
qs = max(0, -20 + 4 * price)
stock += qs - qd
print(step, round(price, 2), round(qs - qd, 2), round(stock, 2))
price += speed * (qd - qs)
if floor is not None:
price = max(price, floor)
print("No floor")
simulate(30)
print("Floor at 25")
simulate(30, floor=25)With no floor, the surplus shrinks each step and the stock stops growing as the price nears 20. With the floor, the price stops at 25 and the surplus stays at 30 units every period. The stock then grows by 30 each step: 60 after the first step, then 102, 132, 162, 192, 222. Someone has to store it, destroy it, or buy it. Governments that support farm prices have faced exactly this problem, holding stockpiles of grain or butter.
A binding floor also reduces trade. At the floor of 25, only 50 units are traded, compared with 60 at equilibrium. Sellers collectively gain on the units they do sell, but 10 mutually beneficial trades never happen. A later chapter measures that loss as deadweight loss.
Edge cases and common errors
- Reading quantity traded from the supply curve. At a price above equilibrium, trade equals Qd, not Qs.
- Negative quantities. Linear formulas can go below zero outside the range where they are meaningful. Clip at zero, as the code does, and recognize the choke price.
- Sign confusion. Surplus is Qs - Qd, while excess demand is Qd - Qs. Pick one convention and state it. A positive excess demand is a shortage and a negative one is a surplus.
- Treating the surplus as the same at all prices. The size grows with the distance from equilibrium, at a rate set by the slopes. In this market it grows by 6 units per dollar, until the choke price changes the rate to 4 units per dollar, the supply slope alone.
- Perishables and storage. A surplus of fresh fish is wasted if unsold, so sellers cut prices fast. A surplus of canned goods can sit in a warehouse, so the pressure to cut is slower. Storage cost matters to how quickly the price falls.
- Unsold units that return next period. Inventory carried forward can add to next period's supply, so a surplus can last longer than one round of price cuts suggests.
Exercise
Using Qd = 100 - 2P and Qs = -20 + 4P, find the surplus at P = 28 and the quantity actually traded. Then explain why the traded quantity is not Qs.
Show answer
At P = 28, Qd = 100 - 56 = 44 and Qs = -20 + 112 = 92. The surplus is 92 - 44 = 48, which matches 6(28 - 20) = 48. The quantity traded is min(44, 92) = 44. It is not Qs because buyers cannot be forced to purchase more than they demand. Sellers offer 92 units, but only the 44 that buyers want to buy change hands, and the other 48 go unsold.
Exercise
A new market has Qd = 80 - 4P and Qs = 10 + 3P. (a) Find the equilibrium price. (b) Find the surplus at a price floor of 14. (c) At what price does Qd reach zero?
Show answer
(a) Set 80 - 4P = 10 + 3P, so 70 = 7P and P = 10. Quantity is 80 - 40 = 40. (b) At P = 14, Qd = 80 - 56 = 24 and Qs = 10 + 42 = 52, so the surplus is 28. This also equals 7(14 - 10) = 28. (c) Qd = 0 when 80 - 4P = 0, so P = 20.
Exercise
In the adjustment code, the price update is price += 0.05 * (qd - qs). Why does a surplus make the price fall, and what would happen to the sign of the update if you wrote (qs - qd) instead?
Show answer
In a surplus, qs is greater than qd, so qd - qs is negative and the update lowers the price, which is the intended seller response. Writing (qs - qd) would flip the sign. A surplus would then raise the price and make the gap larger each round, so the price would move away from equilibrium and the loop would diverge instead of converging.