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 — 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.

At a glance

Formula shown
Q* = (a − c) ÷ (b + d), then P* = a − bQ* for linear supply and demand.
Scenario support
Shift simulator, price ceiling/floor, and tax/subsidy modules with side-by-side scenario comparison.
Workbook export
15-sheet Excel (XLSX) workbook + CSV
Educational estimate
Planning support from the values you enter — not professional advice.

How to read your result

Market equilibrium is the single price and quantity where the amount buyers want to purchase exactly equals what sellers want to provide — no shortage, no surplus, no pressure on price to move. The graph shades two triangles: consumer surplus (value buyers receive above the price they pay) and producer surplus (value sellers receive above their minimum acceptable price); together they are total surplus, the gains from trade, largest exactly at this competitive equilibrium. Shift either curve and both price and quantity move — demand up moves both up, supply up lowers price but raises quantity. A price ceiling or floor only has an effect (a shortage or a surplus) when it is set on the wrong side of equilibrium; otherwise the market clears normally. The single most counter-intuitive result here is tax incidence: who actually bears a per-unit tax is set by relative elasticity, not by who legally pays it — the steeper (more inelastic) side of the market carries the larger share, and the units that stop trading because of the tax become deadweight loss, value destroyed that nobody captures.

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.

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.

Worked example

Demand P = 100 − 2Q and supply P = 20 + 3Q. Setting them equal: Q* = (100 − 20) ÷ (2 + 3) = 80 ÷ 5 = 16, and P* = 100 − 2 × 16 = $68.

Consumer surplus = ½ × (100 − 68) × 16 = $256; producer surplus = ½ × (68 − 20) × 16 = $384; total surplus = $640 — this is the canonical case the engine and Excel workbook are validated against.

Because demand is flatter than supply here (b = 2, d = 3), a $10 per-unit tax would split as buyers bearing 2 ÷ 5 = 40% and sellers bearing 3 ÷ 5 = 60%, shrinking quantity from 16 toward 14 and destroying about $10 of surplus as deadweight loss.

Limitations

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 above 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.

  • 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 a model of an idealised single market, not a forecast of real prices.

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.

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.

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.

Related calculators

  • Price Elasticity of Demand CalculatorMeasure price elasticity of demand (midpoint and simple PED) and test how a price change affects revenue and profit.
  • Marginal Utility CalculatorTurn a utility table into total and marginal utility and utility per dollar, and find the satiation point.
  • Opportunity Cost CalculatorCompare two choices to see net value, opportunity cost, explicit vs implicit costs, and risk-adjusted scenarios.
  • Break-Even CalculatorFind units and revenue break-even, contribution margin, target profit, and margin of safety, with sensitivity tables and a chart.
  • Profit Margin CalculatorWork out gross, contribution, operating, and net margin, with target pricing, break-even, scenarios, and SKU comparison.

Read the guide

There is no dedicated market equilibrium guide yet. For a deeper, two-point elasticity treatment, see the price elasticity of demand calculator.

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. Educational explanation follows standard microeconomics (OpenStax, Principles of Economics 3e).

Inputs are processed in your browser and never stored on our servers.How we calculate · Found an error? email us

Authorship & verification

Written and maintained by

  • Formula and examples verified on 14 June 2026
  • Educational estimate only

Add this calculator to your site

Responsive embed — and private: nothing your visitors type leaves their browser.