Consumer and producer surplus calculator

Consumer surplus is the difference between what buyers would be willing to pay and what they pay; producer surplus is the difference between the price and the lowest price sellers would accept. Enter a market with straight-line demand and supply, or a single deal, and get both surpluses and their total.

Case
Consumer surplus2,000.00
Producer surplus2,000.00
Total surplus
4,000.00
Spending (price × quantity)
6,000.00

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Choose market (linear demand and supply) or single deal.
  2. Market: enter the price where demand falls to zero, the price where supply starts, the market price and the quantity sold.
  3. Single deal: enter the buyer’s willingness to pay, the seller’s cost, the price and the number of units.

Formula

Market with straight-line curves (triangles on a price-quantity chart):

  • Consumer surplus = ½ × (demand’s highest price − price) × quantity
  • Producer surplus = ½ × (price − supply’s lowest price) × quantity

Single deal:

  • Consumer surplus = (willingness to pay − price) × units
  • Producer surplus = (price − seller’s cost) × units

Worked example

Demand reaches zero at 50, supply starts at 10, and the market clears at a price of 30 with 200 units sold:

  • Consumer surplus = ½ × (50 − 30) × 200 = 2,000.00.
  • Producer surplus = ½ × (30 − 10) × 200 = 2,000.00.
  • Total surplus 4,000.00; buyers spend 30 × 200 = 6,000.00.

A single deal: someone who would pay 120 buys 3 units at 80 from a seller whose cost is 50. Consumer surplus (120 − 80) × 3 = 120.00, producer surplus (80 − 50) × 3 = 90.00.

Tips

  • In market mode enter the equilibrium price and quantity, where demand and supply meet. With a price floor or ceiling the areas are no longer simple triangles.
  • With curved demand the triangle is only an approximation.
  • Surplus is measured in money, but it is a gain in welfare, not cash anyone receives.

Frequently asked questions

What is the consumer surplus formula?

With a straight-line demand curve, consumer surplus is the triangle between the curve and the price: ½ × (highest price on the demand curve − market price) × quantity. For one purchase it is willingness to pay − price.

How is producer surplus calculated?

With a straight-line supply curve: ½ × (market price − lowest price on the supply curve) × quantity. For one sale: price − the seller's cost.

What is total surplus?

Consumer surplus + producer surplus: the total gain from trade. In a competitive market without taxes or price controls it is largest at the equilibrium price and quantity.

Where do I get the highest price buyers pay?

It is the price at which the demand curve reaches zero quantity (the vertical intercept). If demand is written Q = a − bP, it is a ÷ b. For supply Q = c + dP, the lowest price is −c ÷ d.

More in Finance

All tools in this category: Finance ·Updated November 7, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.