How consumer and producer surplus work
Every voluntary trade creates value out of thin air. A buyer who would have paid $100 and a seller who would have accepted $20 both say yes at $60 — and between them they are $80 better off than if the trade never happened. Surplus is how economists count that created value across a whole market. The buyers' share (what they would have paid minus what they did pay) is consumer surplus; the sellers' share (what they were paid minus their minimum) is producer surplus. The idea goes back to Jules Dupuit in 1844 and was formalized by Alfred Marshall in 1890, and it remains the standard tool for judging whether a policy — a tax, a price ceiling, a tariff — makes a market better or worse off.
The surplus formulas
Consumer surplus = ½ × Q × (Pmax − P)
Producer surplus = ½ × Q × (P − Pmin)
Total surplus = CS + PS
where Q is the quantity traded, P the market price, Pmax the demand choke price (the most any buyer would pay), and Pmin the supply choke price (the least any seller would accept). The ½ appears because each surplus is the area of a triangle — the gap between willingness to pay (or accept) and the price shrinks steadily from its maximum on the first unit to zero on the last. With full curve equations — demand P = a − bQ and supplyP = c + dQ — solve Q* = (a − c) ÷ (b + d) andP* = a − bQ* first, then apply the same triangle formulas at the equilibrium point.
Worked example
Suppose the most eager buyer would pay $100, the lowest-cost seller would accept $20, and the market clears at $60 with 500 units traded. Here is the surplus accounting:
| Step | Amount |
|---|---|
| The marketdemand choke price $100, supply choke price $20 | $60 × 500 units |
| Consumer surplus = ½ × Q × (Pmax − P)½ × 500 × ($100 − $60) | $10,000 |
| Producer surplus = ½ × Q × (P − Pmin)½ × 500 × ($60 − $20) | $10,000 |
| = Total surplus (gains from trade)the value this market creates that nobody paid for | $20,000 |
Computed with this calculator's default settings — open the tool above and you'll see the same numbers, then swap in your own market data.
Why equilibrium maximizes total surplus
At the equilibrium price, something remarkable is true: every trade worth making happens, and no trade that destroys value does. Each unit up to the equilibrium quantity has a buyer who values it more than it costs a seller to supply — so trading it adds to total surplus. Beyond equilibrium the ordering flips, and forcing extra trades would destroy value. That is why economists call the free-market quantityallocatively efficient, and why interventions that move the market away from it — price ceilings, price floors, quotas — shrink the total triangle even when they deliberately shift surplus from one side to the other. The shrinkage has a name, deadweight loss, and it falls on trades that simply stop happening: renters who can't find apartments under a rent ceiling, workers priced out by a wage floor.
Surplus analysis pairs naturally with the other tools of intro micro: the steepness of the demand curve that shapes the consumer-surplus triangle is measured by ourprice elasticity of demand calculator, the seller's minimum acceptable price is grounded in the cost math of thebreak-even point calculator, and the gap between a seller's price and cost per unit — the raw material of producer surplus — is exactly what themargin calculatormeasures.
Frequently asked questions
What is consumer surplus?
Consumer surplus is the gap between what buyers would have been willing to pay and what they actually paid, summed across every unit sold. If you would happily pay $100 for a concert ticket that costs $60, you walk away $40 better off — that $40 is your surplus. On a supply-and-demand diagram it is the triangle between the demand curve and the horizontal price line: the buyers near the top of the curve valued the good far above the price, and the market let them keep the difference.
What is producer surplus?
Producer surplus is the mirror image on the seller side: the difference between the price sellers actually receive and the minimum they would have accepted, summed across every unit. A seller whose costs let them break even at $20 but who sells at $60 pockets $40 of surplus on that unit. Graphically it is the triangle between the price line and the supply curve. It is closely related to profit, but not identical — producer surplus ignores fixed costs, counting only the gap between price and the marginal cost of each unit.
Why is surplus a triangle?
Because with straight-line demand and supply curves, the gap between what people would pay (or accept) and the market price shrinks steadily to zero. The very first unit generates the largest gap — the full distance from the choke price to the market price — and the last unit traded generates none, since the marginal buyer and seller are exactly indifferent. Plotting those shrinking gaps across the whole quantity traces out a right triangle, so the familiar area formula applies: ½ × base (quantity) × height (price gap).
What happens to surplus when the price changes?
A price move redistributes surplus between the two sides and, away from equilibrium, destroys some of it. If price rises above equilibrium, producers capture surplus that used to belong to consumers — but the higher price also chokes off trades that were worth making, and the surplus those lost trades would have created vanishes entirely. Economists call that loss deadweight loss. A price below equilibrium does the same in reverse. Try it in the calculator: hold the choke prices fixed and move the market price to watch the split shift.
What is total surplus, and why does it measure efficiency?
Total surplus is consumer surplus plus producer surplus — the entire wedge of value between the demand and supply curves up to the quantity traded. Economists use it as the yardstick of market efficiency because it counts every gain from trade regardless of who receives it. At the equilibrium quantity, every trade that benefits both sides happens and none that hurts either side does, so total surplus is as large as it can be. Price ceilings, price floors, taxes, and quotas all shrink the triangle, which is the formal sense in which they are "inefficient."
Sources
- OpenStax, Principles of Economics — Demand, Supply, and Efficiency
- Marshall, Principles of Economics (1890) — on consumer's surplus (Library of Economics and Liberty)
The official figures this page quotes are drawn from the primary sources above — check them (or a qualified professional) before relying on a result.
Disclaimer: This calculator is foreducation and illustration only. The triangle formulas assume straight-line demand and supply curves; real markets curve, shift, and interact with other markets, so measured surplus is a stylized approximation, not a welfare study. Nothing here is pricing, financial, or policy advice.