Consumer and Producer Surplus Calculator

Consumer surplus, producer surplus, and total surplus at market equilibrium.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter linear demand and supply and, optionally, a price. Leave the price blank for the free-market equilibrium, or enter one to see surplus when the price is set elsewhere. The calculator shows both surpluses and their total.

How to use

1
Step 1
Enter the demand and supply parameters a, b, c and d.
2
Step 2
Leave the price blank for equilibrium, or enter a price.
3
Step 3
Press Compute.

How it works

Consumer surplus is the gap between what buyers would pay and what they do pay, summed over units. Producer surplus is the gap between what sellers receive and the least they would accept. At equilibrium the quantity is Q*. At any other price the quantity traded is the smaller of demand and supply, because the short side limits trade, and surplus is measured over that quantity.

Q = min(Qd(P), Qs(P))      CS = area between the demand curve and the price over Q      PS = area between the price and the supply curve over Q

Worked example

Equilibrium, then a price of 30

Input
a 120; b 3; c 20; d 2; price blank, then 30
Output
Equilibrium: CS 600, PS 900, total 1,500. At P = 30: CS 150, PS 975, total 1,125
Walkthrough
At P = 20, Q = 60 and CS = ½ × 60 × (40 − 20) = 600. At a price of 30, demand is 30 and supply is 80, so only 30 units trade. The demand curve runs from 40 down to 30 over those units (average 35), so CS = 30 × (35 − 30) = 150. The supply curve runs from −10 up to 5 (average −2.5), so PS = 30 × (30 + 2.5) = 975. Total surplus drops from 1,500 to 1,125.

Limitations

  • Linear curves only.
  • At a non-equilibrium price it assumes trade at the short side.

Questions

What is consumer surplus?
The difference between the most buyers would pay and the price they actually pay, summed over the units bought.
What is producer surplus?
The difference between the price sellers receive and the least they would accept, summed over units sold.
Why does total surplus fall at a price of 30?
Fewer units trade (30 instead of 60), so some gains from trade are lost.
How do I get surplus at equilibrium?
Leave the price blank. The tool uses P* and Q*.

Features

  • Equilibrium or any price
  • Total surplus
  • Market diagram
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Supply and demand

    Khan Academy

    Equilibrium framing for the linear market tools.

    Watch on YouTube
  • Consumer and producer surplus

    Khan Academy

    Surplus areas drawn on economics hub charts.

    Watch on YouTube