Supply and Demand Calculator
Linear market equilibrium price and quantity from demand and supply curves.
About this tool
Enter the intercepts and slopes of a linear demand and supply curve. The calculator finds the equilibrium price and quantity, the choke prices, and the consumer, producer and total surplus, and draws the market.
How to use
How it works
Equilibrium is where quantity demanded equals quantity supplied, which solves to P* = (a − c) ÷ (b + d). Substitute it into either curve for Q*. The demand choke price is a ÷ b, where demand falls to zero. Consumer surplus is the triangle between the demand curve and the price; producer surplus is the triangle between the price and the supply curve.
P* = (a − c) ÷ (b + d) Q* = a − bP* CS = ½ × Q* × (a/b − P*) PS = ½ × Q* × (P* − (−c/d))
Worked example
Qd = 100 − 2P and Qs = 20 + 2P
- Input
- a 100; b 2; c 20; d 2
- Output
- P* 20; Q* 60; CS 900; PS 900; total surplus 1,800
- Walkthrough
- 100 − 2P = 20 + 2P gives 80 = 4P, so P = 20 and Q = 60. The demand choke price is 100 ÷ 2 = 50, and the supply choke price is −20 ÷ 2 = −10. CS = ½ × 60 × (50 − 20) = 900 and PS = ½ × 60 × (20 + 10) = 900.
Limitations
- Linear curves only.
- Slopes b and d must be positive.
- A textbook model: no market power, taxes or other distortions unless you use the related tools.
Questions
How do I find equilibrium price and quantity?
What are the choke prices?
How is consumer surplus calculated?
Can supply intercept be negative?
Features
- Equilibrium and surplus
- Choke prices
- 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 YouTubePrice ceilings and floors
Khan Academy
Binding controls, shortage, and surplus intuition.
Watch on YouTube
- Principles of Microeconomics
OpenStax
Free textbook for market and tax incidence topics.
- Deadweight loss
Wikipedia
Efficiency loss concepts for tax and price-control pages.