How the Consumer Surplus Calculator works
Consumer surplus is the gap between what buyers are willing to pay for a good and what they actually pay for it. Because a market normally charges every buyer the same price, the buyers who valued the good more than that price come out ahead — they keep the difference in their pocket. Added up across every unit sold, that difference is the total consumer surplus, and it's one of the core measures economists use to quantify the benefit a market creates for buyers.
The formula
For a linear demand curve, with Pmax as the maximum price buyers are willing to pay (the demand curve's price intercept, where quantity demanded falls to zero), P as the actual market price, and Q as the quantity purchased at that price, consumer surplus is:
CS = ½ × (Pmax − P) × Q
Geometrically, this is the area of the triangle bounded by the demand curve above, the horizontal market-price line below, and the vertical axis at quantity Q. The calculator also reports total expenditure (P × Q), total value consumers place on the good (CS + expenditure, equal to ½ × (Pmax + P) × Q for a linear demand curve), and the average surplus per unit (CS ÷ Q).
Worked example
Suppose buyers would pay up to $50 for an item (Pmax), the market actually charges $30 (P), and 200 units are purchased at that price (Q). Consumer surplus is ½ × ($50 − $30) × 200 = $2,000. Buyers spent $6,000 in total (200 × $30) but placed a combined value of $8,000 on those units, so the $2,000 surplus is the extra value they received beyond what they paid — $10 per unit on average.
What moves the surplus most
- Gap between maximum price and market price: for a fixed quantity, a wider gap between what buyers would pay and what they do pay increases surplus proportionally.
- Quantity purchased: at a fixed price gap, more units sold means more total surplus, since each additional unit adds its own slice of the triangle.
- Shape of the demand curve: this calculator assumes a straight-line (linear) demand curve. A curve that bends more steeply near the market price would concentrate value differently, but the linear estimate is the standard approximation used in introductory economics.
Consumer surplus versus producer surplus
Consumer surplus covers only the buyer's side of a transaction. Producer surplus is the mirror-image concept — the extra revenue sellers receive above the minimum price they'd accept — and the two together make up total economic surplus at a given market price. This calculator computes consumer surplus only, and it assumes a single-price market where every unit sells at the same price P (no price discrimination between buyers).