Economics · supply & demand

Market Equilibrium Calculator

Solve for the equilibrium price and quantity where supply meets demand, see the interactive graph with shaded consumer and producer surplus, then simulate demand and supply shifts, price ceilings and floors, and per-unit taxes and subsidies — including who really bears the tax.

Transparent assumptions Interactive supply–demand graph Shift, price-control & tax modules Surplus, deadweight loss & incidence 15-sheet Excel workbook + CSV

Formula-backed supply-and-demand model with an interactive graph, surplus, deadweight loss, and tax incidence — educational use, not a market forecast.

Market equilibrium is where quantity demanded equals quantity supplied: Q* = (a − c) ÷ (b + d), P* = a − bQ*. Enter a linear demand and supply curve and this lab solves the clearing point, shades consumer and producer surplus on an interactive graph, and lets you test shifts, price controls, and taxes — with deadweight loss and elasticity-based incidence.

Demand curve P = a − bQ

$

Choke price — the price at which demand falls to zero.

How much buyers' price falls per extra unit.

Supply curve P = c + dQ

$

Lowest price the first unit is supplied at.

How much sellers' price rises per extra unit.

Equilibrium quantity Q*

16

where Qd = Qs

Equilibrium price P*

$68

market-clearing price

Consumer surplus

$256

buyers' gain

Producer surplus

$384

sellers' gain

Supply & demand

Q* 16 · P* $68
027548110813401224354759CSPSDemandSupplyQuantity (Q)Price (P)

Hover or drag across the graph to read demand and supply prices at any quantity.

DemandSupplyEquilibrium

Total surplus

$640

CS + PS (max gains from trade)

Demand reaches $0 at

50 units

choke quantity

Surplus split

40% / 60%

consumers / producers

What the result means

The market clears at 16 units and $68: at that price the quantity buyers want exactly equals the quantity sellers offer, so there is no pressure for price to move.

Consumer surplus is $256 (value buyers keep above the price) and producer surplus is $384 (revenue sellers keep above cost), for $640 of total surplus — the largest the gains from trade can be in this market.

Supply & demand schedule
Demand and supply price at quantities around the equilibrium, with the market pressure at each.
QuantityDemand priceSupply priceMarket pressure
0$100$20Shortage → price rises
8$84$44Shortage → price rises
16$68$68◀ equilibrium (clears)
24$52$92Surplus → price falls
32$36$116Surplus → price falls

Scenario comparison

Save the current view (any module) to stack scenarios side by side — base case, a shift, a price control, a tax.

Save & export — from your current inputs

The Excel workbook uses live formulas — edit a, b, c, d or a policy lever on the Inputs sheet and every sheet recalculates. Inputs run in your browser and are saved locally only — never uploaded.

Quick answers

What does the equilibrium point this calculator returns mean?

The equilibrium point is the price and quantity at which the amount buyers want to purchase exactly equals the amount sellers want to provide. At that point there is no shortage and no surplus, so price has no tendency to move.

How do you find equilibrium price and quantity?

Set demand equal to supply. With linear curves P = a − bQ and P = c + dQ, the equilibrium quantity is Q* = (a − c) ÷ (b + d), and the equilibrium price is P* = a − bQ*. For example, demand P = 100 − 2Q and supply P = 20 + 3Q clear at Q* = 16 and P* = $68.

What happens above or below the equilibrium price?

A price above equilibrium leaves a surplus — sellers want to supply more than buyers will take — which pushes price down. A price below equilibrium creates a shortage that pushes price up. Both forces drive the market back toward the clearing point.

Who actually pays a tax — buyers or sellers?

Tax incidence is set by the relative elasticity of demand and supply, not by who legally pays. The more inelastic (steeper) side bears the larger share. With slopes b and d, buyers bear b ÷ (b + d) of a per-unit tax and sellers bear d ÷ (b + d).

What is market equilibrium?

A market equilibrium is the single price and quantity at which the plans of buyers and sellers are consistent: the amount buyers want to purchase equals the amount sellers want to provide. At that price there is no leftover stock and no unmet demand, so nothing pushes the price up or down. Equilibrium is not where either side would most like to be — it is the one outcome both sides can live with at once.

This Market Equilibrium Calculator — also searched for as a supply and demand calculator or an equilibrium price and quantity solver — turns two linear curves into the full picture economists draw: the clearing point, the surplus triangles, and what happens when demand or supply shifts, a price control bites, or a tax is imposed.

How this calculator works

  1. Describe the two curves. Enter the linear demand curve P = a − bQ and supply curve P = c + dQ, or switch to the two-point mode and type two (quantity, price) points on each curve to have the equation fitted for you.
  2. Read the equilibrium. The calculator solves Q* = (a − c) ÷ (b + d) and P* = a − bQ* instantly and plots the crossing point on the interactive graph, with dashed guide lines to the price and quantity axes.
  3. Inspect surplus. In the Equilibrium & surplus view, the consumer-surplus and producer-surplus triangles are shaded on the graph and totalled in the result cards. Hover or drag across the graph to read demand and supply prices at any quantity.
  4. Simulate a shift. Open the Shift simulator, pick a preset (demand rises, supply falls, and so on) or drag the sliders, and read the four-step before/after table to see which way price and quantity move.
  5. Add a policy. Use the Price ceiling/floor module to test whether a control binds and how much deadweight loss it creates, or the Tax & subsidy module to see the price buyers pay, the price sellers keep, revenue, and the incidence split.
  6. Compare and export. Save several scenarios to a comparison table, expand the elasticity panel, copy a text summary, or download a CSV of the results and schedule.

The equilibrium maths

Writing demand as P = a − bQ and supply as P = c + dQ turns the diagram into two straight lines. The intercept a is the choke price where demand falls to zero; c is the floor price below which nothing is supplied. The slopes b and d say how steeply each line tilts. Setting the two prices equal and solving gives a clean result:

Q* = (a − c) ÷ (b + d), then P* = a − bQ*.

The numerator (a − c) is the vertical gap between the curves at zero quantity — how far apart buyers’ ceiling and sellers’ floor start — and the denominator (b + d) is how fast that gap closes as quantity rises. A wide starting gap or gently sloping curves means a large equilibrium quantity; a narrow gap or steep curves means a small one. With demand P = 100 − 2Q and supply P = 20 + 3Q, Q* = 80 ÷ 5 = 16 and P* = 100 − 2 × 16 = $68.

Consumer and producer surplus

Consumer surplus is the value buyers receive above the price they actually pay — the triangle between the demand curve and the price line, out to Q*. Producer surplus is the amount sellers receive above the minimum they would have accepted — the triangle between the price and the supply curve. For linear curves they are simple triangles: CS = ½ × (a − P*) × Q* and PS = ½ × (P* − c) × Q*. Together they are total surplus, the gains from trade, which is at its maximum exactly at the competitive equilibrium. In the sample market, CS = $256, PS = $384, and total surplus = $640.

The graph shades both triangles so you can see, at a glance, how the gains split between buyers and sellers — and the result cards report the split as a percentage.

Shifts and the four-step process

The real power of the model is comparative statics: predicting how the equilibrium moves when something changes. The shift simulator follows the standard four-step process — identify which curve moves, decide the direction, draw the new curve, and read the new equilibrium:

  • Demand increases (incomes rise, a substitute gets pricier, tastes shift toward the good): price and quantity both rise.
  • Demand decreases: price and quantity both fall.
  • Supply increases (cheaper inputs, better technology): price falls, quantity rises.
  • Supply decreases (an input shock): price rises, quantity falls.

When both curves move, one of price or quantity is determinate and the other becomes ambiguous, depending on which shift is larger — the simulator flags this and lets you slide the shifts until the ambiguous outcome flips.

Price ceilings and price floors

A price ceiling is a legal maximum price; it only binds when set below equilibrium, where it locks in a persistent shortage (rent control is the classic case). A price floor is a legal minimum; it binds only above equilibrium, locking in a surplus (a minimum wage or an agricultural support price). When a control binds, the short side of the market sets the quantity that actually trades, and the trades that no longer happen create a deadweight-loss triangle between the curves. The module reports whether the control binds, the shortage or surplus, the quantity traded, and the deadweight loss — and the graph shades the excess-demand or excess-supply band.

Taxes, subsidies, and who really pays

A per-unit tax drives a wedge between the price buyers pay and the price sellers keep. It shrinks the quantity traded, raises revenue on the units that still trade, and destroys surplus on the units that stop — the deadweight loss. The most important lesson is about incidence: the split of the burden depends on relative elasticity, not on who legally hands over the money. The more inelastic (steeper) side bears more, because it is less able to walk away. With linear slopes, buyers bear b ÷ (b + d) and sellers bear d ÷ (b + d). A subsidy is the mirror image — a negative wedge that expands quantity past the efficient level, costs the government money, and still creates deadweight loss.

Elasticity at the equilibrium

The collapsible elasticity panel reports point elasticity at the clearing point: |Ed| = (1 ÷ b) × (P* ÷ Q*) for demand and Es = (1 ÷ d) × (P* ÷ Q*) for supply. A value above 1 is elastic (quantity responds strongly to price), below 1 is inelastic, and exactly 1 is unit elastic. Elasticity is the bridge between the geometry here and tax incidence: the more inelastic side carries the heavier tax burden. For a deeper, two-point treatment, use the dedicated price elasticity of demand calculator.

Worked examples

1. Textbook equilibrium

Demand P = 100 − 2Q and supply P = 20 + 3Q clear at Q* = 16 and P* = $68, with consumer surplus $256, producer surplus $384, and total surplus $640 — the worked case this tool is validated against.

2. A binding price ceiling

Cap the price at $50 (below $68) and the ceiling binds: buyers want 25 units, sellers offer only 10, leaving a 15-unit shortage, just 10 units traded, and $90 of deadweight loss.

3. A per-unit tax

A $10 tax shrinks quantity from 16 to 14. Buyers pay $72, sellers keep $62, government collects $140, and $10 of surplus is destroyed. Because demand is flatter than supply here, buyers bear 40% and sellers 60%.

4. A demand shock

An outward demand shift (higher incomes, a fad, a substitute’s price rising) raises both the equilibrium price and quantity along the upward-sloping supply curve — the shift simulator shows the new point against the old.

How the formulas work

Equilibrium quantity

Q* = (a − c) ÷ (b + d)

Where demand price equals supply price.

Equilibrium price

P* = a − bQ*

Substitute Q* into either curve.

Consumer surplus

CS = ½ × (a − P*) × Q*

Triangle under demand, above price.

Producer surplus

PS = ½ × (P* − c) × Q*

Triangle above supply, below price.

Tax incidence (buyers)

share = b ÷ (b + d)

From slopes — steeper side bears more.

Deadweight loss

DWL = ½ × wedge × ΔQ

Triangle over the units that stop trading.

Download the Excel workbook

The download button above the export panel builds a 15-sheet, formula-driven Excel workbook from your exact inputs — not a static snapshot. It opens in Microsoft Excel and Google Sheets, and a single Inputs sheet drives everything: change a, b, c, d or any policy lever and every other sheet recalculates.

  1. Start Here & Inputs — your curves and policy levers in editable cells.
  2. Equilibrium, Surplus & Schedule — Q*, P*, the surplus triangles, and the disequilibrium table.
  3. Shift Simulator — the four-step before/after comparison.
  4. Price Ceiling, Price Floor, Tax & Subsidy — binding tests, shortages/surpluses, revenue, incidence, and deadweight loss.
  5. Elasticity, Scenario Comparison, Dashboard, Methodology & Printable Summary — the analysis, a side-by-side table, and a one-page recap.

You can also export a CSV of the results and schedule for spreadsheets, reports, or classroom use.

Limitations of this calculator

Methodology

This calculator solves linear inverse demand (P = a − bQ) and supply (P = c + dQ), computes surplus as the standard welfare triangles, derives shift, price-control, tax, and subsidy outcomes analytically, and reports point elasticity and slope-based tax incidence. The engine is validated against the canonical worked case (Demand P = 100 − 2Q, Supply P = 20 + 3Q → Q* = 16, P* = $68, CS = $256, PS = $384, total surplus = $640) and several hand-computed policy cases on every change, and the Excel workbook’s formulas are checked with a spreadsheet formula engine against the same maths. Updated 14 June 2026 · Calculator Matters.

  • Demand and supply are assumed linear over the relevant range; real schedules can bend, kink, or shift.
  • It models a single competitive market in isolation, ignoring related markets, expectations, and time lags in adjustment.
  • Surplus, deadweight loss, and incidence are exact only for the linear model; they approximate curved real-world curves.
  • It is an educational model, not a forecast of real prices, and not pricing, tax-policy, or investment advice.

Frequently asked questions

What is market equilibrium?

Market equilibrium is the price–quantity combination at which quantity demanded equals quantity supplied. There is no shortage or surplus, so there is no pressure for the price to rise or fall.

How do you calculate the equilibrium price and quantity?

Set the demand and supply prices equal. For linear curves P = a − bQ and P = c + dQ, solving gives Q* = (a − c) ÷ (b + d), and substituting back gives P* = a − bQ*. The calculator floors quantity at zero if the curves do not cross at a positive quantity.

Why do I set demand equal to supply?

At equilibrium a single price prevails and the same quantity is bought and sold, so the price buyers will pay for that quantity must equal the price sellers require. Setting the two equations equal pins down that shared point.

What are the slopes b and d?

They measure how steeply price changes with quantity. The demand slope b is how much the price buyers will pay falls for each extra unit; the supply slope d is how much the price sellers require rises for each extra unit. Steeper curves mean a more inelastic side.

What is consumer and producer surplus?

Consumer surplus is the value buyers receive above the price they pay — the triangle between the demand curve and the price. Producer surplus is the amount sellers receive above their minimum acceptable price — the triangle between the price and the supply curve. Together they are total surplus, the gains from trade, which is largest at the competitive equilibrium.

How does a shift in demand or supply change the equilibrium?

An increase in demand (rightward shift) raises both price and quantity; a decrease lowers both. An increase in supply lowers price but raises quantity; a decrease raises price but lowers quantity. When both curves move, one of price or quantity is determinate and the other depends on the relative size of the shifts — the simulator shows this.

When does a price ceiling or floor actually bind?

A price ceiling binds only when it is set below the equilibrium price, creating a shortage. A price floor binds only when it is set above the equilibrium price, creating a surplus. A ceiling above or a floor below equilibrium has no effect, and the market clears normally.

What is deadweight loss from a price control or tax?

Deadweight loss is the value of mutually beneficial trades that no longer happen because the policy holds quantity away from the efficient level. On a linear diagram it is the triangle between the supply and demand curves over the units that stop trading — surplus destroyed that no one captures.

Who bears a tax — buyers or sellers?

Whoever is less able to walk away. Incidence is determined by relative elasticity, not by who legally remits the tax. With linear slopes, buyers bear b ÷ (b + d) of a per-unit tax and sellers bear d ÷ (b + d); the steeper (more inelastic) side carries more.

How is a subsidy different from a tax here?

A per-unit subsidy is a negative wedge: it expands quantity beyond the free-market level, lowers the price buyers pay, and raises the price sellers receive. It costs the government money and still creates deadweight loss by pushing the market past its efficient quantity.

What does elasticity at the equilibrium tell me?

Point elasticity measures how responsive quantity is to price at the equilibrium. The tool computes |Ed| = (1 ÷ b) × (P* ÷ Q*) for demand and Es = (1 ÷ d) × (P* ÷ Q*) for supply. Values above 1 are elastic (responsive), below 1 inelastic, and exactly 1 unit elastic.

Can I enter a real demand and supply schedule instead of an equation?

Yes. Switch to the two-point mode and enter two (quantity, price) points on each curve; the calculator fits the linear equation, warns you if a curve slopes the wrong way, and then runs the full analysis on the fitted curves.

Why might the calculator show a quantity of zero?

If the supply intercept exceeds the demand intercept, sellers’ minimum price already tops buyers’ maximum, so no mutually agreeable trade exists. The model floors quantity at zero and the surplus and policy modules switch off until the curves cross at a positive price.

Is this a forecast of real prices?

No. It is a teaching and decision-support model of idealised linear curves. Real markets curve, shift, and adjust over time, and are affected by frictions the model ignores. Use it to build intuition and check homework, not to predict a market price.

What does the Excel workbook include?

Fifteen sheets: Start Here, Inputs, Equilibrium, Surplus, Schedule, Shift Simulator, Price Ceiling, Price Floor, Tax, Subsidy, Elasticity, Scenario Comparison, Dashboard, Methodology, and a Printable Summary. The Inputs sheet drives everything with live formulas, so editing a, b, c, d or a policy lever recalculates the whole workbook in Excel or Google Sheets.

Related calculators

  • Financial Needs Pyramid CalculatorEstimate how stable each layer of a financial needs pyramid is — from basic needs and safety to financial control, growth, and long-term freedom — using your income, expenses, savings, debt, insurance, and goals, with an interactive pyramid, what-if scenarios, and an Excel report.
  • Price Elasticity of Demand CalculatorMeasure how demand reacts to price (midpoint & simple PED), then test the revenue and profit impact of a price change — with a pricing simulator, −30%…+30% scenario table, ecommerce/SaaS/local models, and a 10-sheet Excel pricing workbook.
  • Marginal Utility CalculatorTurn a utility table into total utility, marginal utility (ΔTU ÷ ΔQ), and utility per dollar — find where diminishing marginal utility begins, the satiation point, the best-value unit, a suggested stopping point, charts, scenario comparison, and a 7-tab Excel workbook.
  • Diminishing Returns CalculatorA short-run production tool: enter input-output data to get total, marginal, and average product, the point of diminishing returns, the three production stages, an input-output graph, optional profit analysis, scenario comparison, and a 6-tab Excel model.
  • Opportunity Cost CalculatorCompare Choice A vs Choice B and see the true cost of a decision — net value, opportunity cost, explicit vs implicit costs, time value, risk-adjusted results, conservative/base/optimistic scenarios, and an 8-tab Excel decision sheet.
  • Break-Even CalculatorA full break-even planner — units and revenue break-even, contribution margin, target profit, margin of safety, and a viability verdict across simple, detailed, service, ecommerce, multi-product, and solve-for modes, with scenarios, sensitivity tables, a break-even chart, and a 12-sheet Excel workbook.
  • Profit Margin CalculatorA full profitability cockpit — gross, contribution, operating, and net margin across simple, advanced, ecommerce, service, SaaS, and solve-for modes, with target pricing, discount impact, break-even, scenarios, SKU comparison, and a 17-sheet Excel workbook.

Sources & disclaimer

The educational explanation follows standard microeconomics. Sources verified June 2026; links open in a new tab.

Economics & supply-and-demand disclaimer

This tool is for economics education and decision-support only. It models idealised linear supply and demand and should not be treated as a forecast of real market prices or a basis for pricing, tax-policy, or investment decisions. Real markets have curved schedules, shifting conditions, frictions, and time lags that a two-line model cannot capture.

Built and maintained by Calculator Matters, an independent calculator project. Inputs are processed in your browser and never stored on our servers. Engine validated against hand-computed cases on every change · Last reviewed 14 June 2026 · How we calculate · Editorial policy · Privacy · Terms · Disclaimer · Found an error? [email protected]

Last reviewed: 14 June 2026. Formula and assumptions reviewed for accuracy.

Add this calculator to your site

Free, responsive embed — and private: nothing your visitors type leaves their browser.