Consumer Surplus Calculator
Calculate consumer surplus from demand curves with interactive graph. Supports linear demand and custom data points with trapezoidal integration.
About
Consumer surplus measures the difference between what buyers are willing to pay for a good and what they actually pay at market equilibrium. Formally it equals the area under the demand curve above the equilibrium price Peq, bounded by quantity Q = 0 to Qeq. Miscalculating this value leads to flawed welfare analysis, incorrect tax incidence estimates, and unreliable cost-benefit assessments in policy work. This tool computes surplus for linear demand (closed-form triangle area) and for arbitrary demand schedules using trapezoidal numerical integration across user-supplied price-quantity pairs.
The linear model assumes a demand function P = a − bQ, where a is the price intercept (maximum willingness to pay) and b is the slope coefficient. For non-linear or empirical demand data, the calculator applies composite trapezoidal quadrature. Note: this tool assumes no externalities and a perfectly competitive market. Results approximate welfare changes and should be cross-checked against econometric demand estimates for policy-grade analysis.
Formulas
For a linear demand curve P = a − bQ, consumer surplus is the triangular area between the demand curve and the equilibrium price line:
Where Pmax = a (the vertical intercept of the demand curve, representing maximum willingness to pay at Q = 0), and Qeq is derived from the demand function: Qeq = a − Peqb.
For non-linear or empirical demand schedules with n price-quantity data points sorted by ascending quantity, consumer surplus is computed via trapezoidal numerical integration:
Where Pi is the demand price at quantity Qi, and only segments where Pi ≥ Peq contribute to surplus. The integration truncates at the point where the demand curve intersects the equilibrium price line.
Variable legend: CS = consumer surplus (monetary units). Pmax = maximum willingness to pay (demand intercept). Peq = market equilibrium price. Qeq = equilibrium quantity. a = price intercept of linear demand. b = slope coefficient (price decrease per unit quantity).
Reference Data
| Market Scenario | Demand Intercept (a) | Slope (b) | Equilibrium Price | Equilibrium Qty | Consumer Surplus |
|---|---|---|---|---|---|
| Textbook Basic | $100 | 2 | $40 | 30 | $900 |
| Elastic Good (Coffee) | $8 | 0.01 | $5 | 300 | $450 |
| Inelastic Good (Insulin) | $500 | 0.5 | $300 | 400 | $40,000 |
| Luxury Handbag | $2,000 | 10 | $800 | 120 | $72,000 |
| Gasoline (Short Run) | $12 | 0.002 | $4 | 4,000 | $16,000 |
| Streaming Service | $25 | 0.0005 | $15 | 20,000 | $100,000 |
| Urban Housing Unit | $3,000 | 5 | $1,500 | 300 | $225,000 |
| College Textbook | $200 | 1 | $120 | 80 | $3,200 |
| Organic Produce | $10 | 0.02 | $6 | 200 | $400 |
| Smartphone (New Model) | $1,500 | 0.5 | $999 | 1,002 | $251,001 |
| Municipal Water | $5 | 0.0001 | $2 | 30,000 | $45,000 |
| Concert Ticket | $300 | 3 | $150 | 50 | $3,750 |
| After Tax Increase (+$10) | $100 | 2 | $50 | 25 | $625 |
| Deadweight Loss Example | $100 | 2 | $60 | 20 | $400 |
| Price Ceiling Effect | $100 | 2 | $30 | 35 | $1,225 |