Interactive simulator

Supply and Demand Simulator

This simulator plots a linear demand curve and a linear supply curve and finds the market equilibrium where quantity demanded equals quantity supplied. Move the shift sliders to model changes in income, tastes, input prices, or technology, and watch the equilibrium price and quantity adjust in real time. The default example uses P = 50 - 0.5Q for demand and P = 10 + 0.125Q for supply, giving an equilibrium of P = 18 and Q = 64.

030609012015001020304050Quantity QPrice PDSE (Q*=64, P*=18.0)
Qd = 100 − 2PQs = 10 + 3PEquilibrium price P* = 18.00Equilibrium quantity Q* = 64.00
Reading the market

Equilibrium solves Qd = Qs, so P* = (a − c) ÷ (b + d). Shifting demand changes a; shifting supply changes c. A ceiling only bites when set below P* (creating a shortage); a floor only bites when set above P* (creating a surplus).

How to use it

  1. Set a new demand intercept to model an increase or decrease in demand.

  2. Move the supply shift slider to model changes in input costs or technology.

  3. Read the equilibrium price and quantity from the intersection marker.

  4. Toggle the price-ceiling and price-floor overlays to preview shortage or surplus.

What you will learn

  • Explain how shifts of demand or supply change equilibrium price and quantity.
  • Distinguish a change in quantity demanded from a change in demand.
  • Predict the direction of price and quantity changes from real-world news.

Model notes

The model uses linear curves with constant slopes, so it cannot capture non-linear demand, kinks, or multiple equilibria. It is a partial-equilibrium model: other markets, incomes, and expectations are held fixed (ceteris paribus). Results are qualitative illustrations, not forecasts.