Understanding the consumer surplus calculator — concept and principle
This calculator measures consumer surplus, the gain buyers get from paying less than they would have been willing to pay, for a straight-line demand curve. It also gives producer surplus, total surplus and total spending. Economics students use it for homework on market welfare, and analysts use it to estimate how much buyers gain or lose when a price changes.
How it is calculated
- Consumer surplus CS = ½ × (Pmax − P) × Q
- Producer surplus PS = ½ × (P − Pmin) × Q
- Total surplus = CS + PS; total spending = P × Q
- Average consumer surplus per unit = (Pmax − P) ÷ 2
Pmax is the highest price any buyer would pay (where demand reaches zero quantity), P the market price, Q the quantity bought at that price, and Pmin the lowest price any seller would accept.
The principle
Each point on the demand curve shows how much one more buyer is willing to pay. Everyone above the market price pays less than their maximum and keeps the difference. Adding those differences gives the area below the demand curve and above the price. With a straight demand line, that area is a triangle with base Q and height Pmax − P, hence the factor ½. Producer surplus is the mirror image: the area above the supply curve and below the price. Their sum, total or social surplus, measures the welfare the market creates.
Worked example
Defaults: Pmax 140, price 80, quantity 28,000, Pmin 30.
- CS = ½ × (140 − 80) × 28,000 = $840,000.
- PS = ½ × (80 − 30) × 28,000 = $700,000.
- Total surplus = $1,540,000.
- Spending = 80 × 28,000 = $2,240,000.
- Average CS per unit = (140 − 80) ÷ 2 = $30.00; CS as % of spending = 840,000 ÷ 2,240,000 × 100 = 37.5%.
| Quantity bought at the market price (units) | Consumer surplus |
|---|---|
| 7,000 | $210,000 |
| 14,000 | $420,000 |
| 21,000 | $630,000 |
| 28,000 | $840,000 |
| 35,000 | $1,050,000 |
| 42,000 | $1,260,000 |
| 56,000 | $1,680,000 |
How to read the result
A large consumer surplus means many buyers value the product well above its price, which leaves room for price rises or price discrimination. A price cut raises consumer surplus; a tax or price rise reduces it. Comparing total surplus before and after a policy change shows whether the market as a whole gains or loses.
Common mistakes
- Using the quantity at a different price than the one entered.
- Forgetting the ½ for a straight-line demand curve.
- Treating the result as exact; real demand curves are rarely straight.
- Entering Pmax below the market price.
Frequently asked questions
What does consumer surplus mean in simple terms?
It is the difference between what buyers would have paid at most and what they actually paid, summed over all buyers.
How does a price increase affect consumer surplus?
It shrinks the triangle: buyers pay more and some stop buying, so consumer surplus falls.
What is deadweight loss?
The fall in total surplus when a tax, price control or monopoly moves the quantity away from the market equilibrium.
Sources: OpenStax, Principles of Economics, 3rd ed., section 3.5 "Demand, Supply, and Efficiency"