User Rating 0.0
Total Usage 0 times
$
Price when quantity demanded is zero
Price decrease per unit of quantity (P = a − bQ)
$
Market clearing price
Quick Presets:
Is this tool helpful?

Your feedback helps us improve.

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.

consumer surplus demand curve economics calculator market equilibrium welfare economics microeconomics surplus area

Formulas

For a linear demand curve P = a bQ, consumer surplus is the triangular area between the demand curve and the equilibrium price line:

CS = 12 × Qeq × (Pmax Peq)

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:

CS = n1i=1 (Pi Peq) + (Pi+1 Peq)2 × (Qi+1 Qi)

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 ScenarioDemand Intercept (a)Slope (b)Equilibrium PriceEquilibrium QtyConsumer Surplus
Textbook Basic$1002$4030$900
Elastic Good (Coffee)$80.01$5300$450
Inelastic Good (Insulin)$5000.5$300400$40,000
Luxury Handbag$2,00010$800120$72,000
Gasoline (Short Run)$120.002$44,000$16,000
Streaming Service$250.0005$1520,000$100,000
Urban Housing Unit$3,0005$1,500300$225,000
College Textbook$2001$12080$3,200
Organic Produce$100.02$6200$400
Smartphone (New Model)$1,5000.5$9991,002$251,001
Municipal Water$50.0001$230,000$45,000
Concert Ticket$3003$15050$3,750
After Tax Increase (+$10)$1002$5025$625
Deadweight Loss Example$1002$6020$400
Price Ceiling Effect$1002$3035$1,225

Frequently Asked Questions

A per-unit tax of t shifts the effective price paid by consumers upward. If supply is perfectly elastic, the new equilibrium price becomes Peq + t, reducing both equilibrium quantity and the surplus triangle area. The change in consumer surplus equals t × Qnew 12 × t × (Qold Qnew). The second term represents deadweight loss.
The triangle formula assumes a perfectly linear demand curve. Real-world demand is often convex or concave. The trapezoidal method approximates the true area under any arbitrary curve by summing trapezoids between adjacent data points. With more data points, it converges toward the true integral. For a genuinely linear demand, both methods yield identical results (within floating-point precision).
If Pmax < Peq, consumer surplus is zero or undefined. No consumer is willing to pay the market price, meaning the quantity demanded at equilibrium is zero. This indicates the good is priced above the entire demand curve, and no transactions occur.
Under standard Marshallian surplus analysis, consumer surplus is non-negative by definition. It represents a net benefit to buyers. If your calculation returns a negative value, it typically indicates an input error: the equilibrium price exceeds the maximum willingness to pay, or data points are entered in incorrect order. This calculator enforces non-negativity and flags such conditions.
More inelastic demand (steeper curve, smaller b coefficient relative to quantity scale) produces larger consumer surplus because consumers value the good far above what they pay. Highly elastic demand (flat curve) yields smaller surplus since willingness-to-pay barely exceeds equilibrium price. The ratio Pmax PeqPeq gives a rough proportional measure.
No. This tool uses Marshallian (ordinary) demand curves, which is the standard approach in applied microeconomics and textbook welfare analysis. Hicksian (compensated) demand accounts for income effects and requires utility function specification. For normal goods, Marshallian surplus slightly overestimates true compensating variation. The difference is negligible for goods representing a small share of consumer budgets.