Advertisement
Advertisement
ECONOMICS

Consumer Surplus Calculator — and producer surplus, from your own curves

Enter a linear demand curve, a linear supply curve and a trading price, and get consumer surplus, producer surplus, total surplus and the welfare loss against the competitive benchmark.

The choke price. Demand is P = a − bQ, so this is what the very first buyer is willing to pay.
Must be greater than zero. Larger b means a steeper, less responsive demand curve.
Supply is P = c + dQ, so this is the marginal cost of the very first unit.
Must be greater than zero. Set it small for a nearly flat, highly elastic supply curve.
Choose the second option to model a price floor, a price ceiling or an administered price.
Used only when the selector above is set to a specified price. Quantity traded becomes the short side of the market.
Purely cosmetic. Enter whatever unit your price axis is measured in.
Consumer surplus
 
Producer surplus
Total surplus
Quantity traded
Loss vs equilibrium
Equilibrium:
Working:
Tip: surplus is measured in price multiplied by quantity units, and is only as meaningful as the two curves you entered.
Advertisement

The consumer surplus calculator above takes a linear demand curve, a linear supply curve and a trading price that you supply, and reports the consumer surplus, the producer surplus, their sum, the quantity actually traded, and how far total surplus falls short of the competitive equilibrium benchmark. Every number it produces is derived from your four coefficients. It contains no market data of any kind.

That last point is the whole design. Consumer surplus is a model output, not a measurement: it is the area between a demand curve and the price paid, and a demand curve is something an economist estimates rather than observes. Arb Digital publishes this page as a teaching and modelling instrument, which is why it asks you for the curve rather than offering you one. If you want the responsiveness of quantity to price rather than the welfare area, our price elasticity calculator handles that, and our marginal cost calculator covers the cost side.

What This Consumer Surplus Calculator Does

It works with the standard linear pair. Demand is written P = a − bQ and supply is written P = c + dQ. You give the four coefficients. The tool solves for the competitive equilibrium, then evaluates surplus at whatever price you are interested in, which may or may not be the equilibrium price.

Consumer surplus is computed as a genuine integral rather than as a memorised triangle formula. It is the area under the demand curve from zero up to the quantity traded, minus what buyers actually pay. Producer surplus is revenue minus the area under the supply curve over the same range. Doing it this way means the answer stays correct when the traded quantity is not the equilibrium quantity, which is precisely the case a triangle formula gets wrong.

When you specify a price away from equilibrium, the quantity traded is the short side of the market: the smaller of quantity demanded and quantity supplied. Above equilibrium demand binds; below it supply binds. The tool says which side is binding and by how much, because the size of the shortage or unsold excess is often the more interesting number.

The final figure compares total surplus at your price against total surplus at the competitive equilibrium. In the textbook framing that gap is the deadweight loss. We label it “loss versus equilibrium” because that is literally what it is, and because calling it a welfare loss implies the equilibrium is the right social benchmark — an assumption, not a fact. Our deadweight loss calculator takes the same curves and works specifically through taxes, floors and ceilings.

How to Use It

  1. Enter your demand curve. The intercept a is the choke price at which demand falls to zero; the slope b is how much price must fall to sell one more unit.
  2. Enter your supply curve. The intercept c is the marginal cost of the first unit; the slope d is how steeply marginal cost rises with volume.
  3. Choose the price. Leave it at equilibrium for the competitive benchmark, or switch to a specified price to model an intervention.
  4. Read the hero and the grid. Consumer surplus is the headline; producer surplus, total surplus, quantity traded and the gap against equilibrium sit beneath it.
  5. Check the working panel, which shows the equilibrium solution and the two integrals so you can reproduce the arithmetic on paper.

The Formula and How It Is Calculated

Equilibrium is where the two curves meet: a − bQ = c + dQ, so Q* = (a − c) ÷ (b + d) and P* = a − bQ*. If a is not greater than c there is no positive-quantity equilibrium at all, because the first buyer is unwilling to pay what the first unit costs to make. The tool says so in words rather than returning a negative quantity.

At a traded quantity Q and a price P, consumer surplus is the integral of the demand price minus the paid price:

CS = ∫0Q (a − bq) dq − PQ = aQ − bQ²/2 − PQ

and producer surplus is revenue minus the integral of the supply price:

PS = PQ − ∫0Q (c + dq) dq = PQ − cQ − dQ²/2

Work the default values through by hand. With a = 100, b = 1, c = 20 and d = 1, equilibrium quantity is (100 − 20) ÷ 2 = 40 and equilibrium price is 100 − 40 = 60. Consumer surplus is 100(40) − 40²/2 − 60(40) = 4,000 − 800 − 2,400 = 800. Producer surplus is 60(40) − 20(40) − 800 = 2,400 − 800 − 800 = 800. Total surplus is 1,600, and the loss against equilibrium is zero, as it must be.

Now switch to a specified price of 70. Quantity demanded is (100 − 70) ÷ 1 = 30 and quantity supplied is (70 − 20) ÷ 1 = 50, so 30 units trade and there is a surplus of 20 unsold units. Consumer surplus becomes 3,000 − 450 − 2,100 = 450, and producer surplus becomes 2,100 − 600 − 450 = 1,050. Total surplus is 1,500, which is 100 short of the 1,600 available at equilibrium. That 100 is the familiar triangle: half of the ten missing units multiplied by the twenty-unit gap between the demand price and the supply price at that margin.

Advertisement

The Assumptions This Model Rests On

Consumer surplus is not a measurement of anything. It is a number produced by a model, and the model carries assumptions that are worth stating plainly, because every one of them is contestable and some of them are known to fail.

First, the demand curve is assumed to be a Marshallian demand curve read as a willingness-to-pay schedule, so that the area beneath it measures the money value of the benefit buyers receive. That reading is exact only when the income effect of the price change is zero. Where the good absorbs a large share of a buyer's budget, the compensating and equivalent variation measures diverge from the Marshallian area, and the surplus figure sits somewhere between them. The Stanford Encyclopedia of Philosophy's entry on preferences sets out how much philosophical weight the notion of a stable, complete preference ordering is being asked to carry here.

Second, surplus is being added across people as if a dollar of benefit is worth the same to everyone. That is an explicit interpersonal comparison, and it is the step that turns an arithmetic area into a welfare claim. A policy that raises total surplus can make poorer households worse off, and the total will not tell you.

Third, the curves are assumed linear. Real estimated demand systems rarely are. Linearity is a convenience that makes the areas triangles, and it is fine near the observed price range and increasingly wrong far from it. The choke price a in particular is an extrapolation, not an observation.

Fourth, the model assumes no externalities and no market power. Where either fails, the competitive equilibrium is not the surplus-maximising outcome and the “loss versus equilibrium” figure measures distance from the wrong benchmark.

Where the Curves Should Come From

This page publishes no demand or supply data, deliberately. Any elasticity or intercept we hard-coded would be stale within a quarter, wrong for your market, and impossible for a reader to audit. Estimate your own, or take them from a source you can cite.

In practice most applied work starts from an estimated elasticity rather than from intercepts, then converts. If you know the price elasticity of demand ε at an observed point (P₀, Q₀), then for a linear curve b = −P₀ ÷ (ε Q₀) and a = P₀ + bQ₀. The same conversion works on the supply side with the supply elasticity. Our price elasticity calculator will give you the elasticity from two observed price and quantity pairs, and our slope calculator will fit the straight line through them.

For methodological grounding on how official statistics are constructed before they reach a model like this, the U.S. Bureau of Economic Analysis publishes its methodologies in full, and the Federal Reserve Board's Finance and Economics Discussion Series is a good place to see how demand systems are actually estimated and how wide the resulting confidence intervals tend to be. Use your own national statistics office if you are working outside the United States.

Reading a Price Floor and a Price Ceiling Correctly

Set a price above equilibrium and you have modelled a binding price floor. Quantity demanded falls, sellers are left with unsold stock, and producer surplus usually rises even though total surplus falls — that combination is exactly why floors get legislated. The tool reports the unsold excess so you can see the cost that sits outside the surplus arithmetic entirely.

Set a price below equilibrium and you have a binding price ceiling. Now supply is the short side, there is a shortage, and consumer surplus per unit rises while the number of units falls. Whether consumer surplus rises overall depends on the relative slopes, which is why the answer is worth computing rather than guessing.

One important caveat on the ceiling case. The surplus figure assumes efficient rationing: that the scarce units go to the buyers who value them most. Real shortages are rationed by queueing, by lottery, by connections or by resale, and under any of those the consumer surplus actually realised is lower than the number here. Queueing in particular burns real resources that never appear in the model. Treat the ceiling result as an upper bound.

Where This Number Genuinely Earns Its Keep

Despite every caveat above, surplus analysis is used constantly, and for good reason: it is the only common language for comparing a benefit to buyers against a cost to sellers. Regulatory impact assessments, merger reviews, infrastructure appraisal and tax design all lean on it.

It is most trustworthy used as a difference rather than a level. Absolute surplus depends heavily on the choke price, the least reliable parameter in the model, whereas the change between two nearby scenarios depends mostly on the local slope, which you can estimate. Compare two runs rather than quoting one figure. Our percentage change calculator expresses the gap, and our break-even calculator covers the firm-level trade-off.

Need a calculator that shows its assumptions instead of hiding them?

Arb Digital builds free tools that state what the model assumes and where the answer stops being reliable.

Browse All Free Tools Talk To Our Team

Common Mistakes to Avoid

  • Using the triangle formula away from equilibrium — half base times height is right only when the traded quantity is the equilibrium quantity. Off equilibrium you need the integral.
  • Quoting an absolute surplus figure — it is dominated by the extrapolated choke price. Differences between scenarios are far more defensible than levels.
  • Treating the loss against equilibrium as proven harm — it is distance from a benchmark that assumes no externalities and no market power.
  • Ignoring who gains and who loses — total surplus adds every party's gain at equal weight and is silent on distribution by construction.
  • Extrapolating a linear curve far from the data — linearity is a local approximation, and the intercepts are the part of it you should trust least.

Related Free Tools From Arb Digital

Model a tax wedge or a binding price control with the deadweight loss calculator, measure responsiveness with the price elasticity calculator, work out the cost of the next unit with the marginal cost calculator, find where revenue covers cost with the break-even calculator, or fit the straight line through two observed points with the slope calculator. The full free online tools hub lists every economics tool we publish.

Frequently Asked Questions

What exactly is consumer surplus?

It is the area between the demand curve and the price actually paid, over the units actually traded. Interpreted as willingness to pay, it is the money value of the benefit buyers get above what they hand over.

Why does this tool not supply any demand data?

Because a demand curve is estimated, not observed, and any figure we hard-coded would be stale, market-specific and unauditable. Every coefficient here is your input, sourced by you.

Is consumer surplus a measurement or a model output?

A model output. It depends entirely on an assumed demand curve and on reading that curve as a willingness-to-pay schedule, which is exact only when income effects are negligible.

How is producer surplus different?

It is revenue minus the area under the supply curve, so it measures the gain to sellers above their marginal costs. It is not profit, because fixed costs never appear in the supply curve.

What happens when I set a price away from equilibrium?

Quantity traded becomes the short side of the market, the smaller of quantity demanded and quantity supplied, and the tool reports the resulting shortage or unsold excess alongside the surplus figures.

Why do the surpluses not add up to the equilibrium total?

Because trade has stopped short of the point where the demand price still exceeds the supply price. The missing mutually beneficial trades are the gap the tool reports against equilibrium.

Does the tool handle non-linear curves?

No. It solves the linear case, which keeps every step reproducible by hand. Linearity is a local approximation and becomes unreliable far from the price range your data actually covers.

Can I trust the number under a price ceiling?

Treat it as an upper bound. It assumes the scarce units reach the buyers who value them most, whereas real shortages are rationed by queueing or resale, which destroys surplus the model never sees.

This page explains a standard microeconomic model for educational purposes and is not economic, investment or policy advice. It publishes no market data; every coefficient is your own input, and the results are only as sound as the curves you supply.

Advertisement
Advertisement

Take it further