EQUILIBRIUM LABTHE COBWEB MODEL · qₜ = S(pₜ₋₁), D(pₜ) = qₜ

Watch prices spiral toward equilibrium.

Reshape the curves, choose a starting price, then follow the cobweb.

01

The cobweb & curve controls

0–40
DemandD(pₜ) = max(0, 120 − 4pₜ)
120
4
SupplyS(pₜ₋₁) = max(0, 30 + 2pₜ₋₁)
30
2
Convergent
READY TO DRAW THE COBWEB

Press Play cobweb to draw the spiral.

Previous price pₜ₋₁23.00
Supply quantity qₜNot started
Clearing price pₜNot started
Price error |p − p*|8.00
Period 0 · current price = 23Equilibrium · p* = 15 · q* = 60|S′ / D′| = 0.50
02

Prices across periods

PeriodPrevious pOutput qClearing pPrice error
Completed periods: 0Latest 8 observations · CSV includes all periods
How the cobweb works & stability
1 · PREVIOUS PRICEUse the previous price pₜ₋₁
2 · HORIZONTAL → SUPPLYProduce qₜ = S(pₜ₋₁)
3 · VERTICAL → DEMANDFind pₜ = D⁻¹(qₜ)

Producers expect last period’s price to persist. Output is fixed before today’s price is known. Each completed period clears the market: D(pₜ) = S(pₜ₋₁).

Equilibrium: price 15.00, quantity 60.00.

D(p*) = S(p*)

Local ratio: below 1 → convergence; above 1 → divergence. A ratio of 1 gives a two-period cycle for the linear model.

For nonlinear curves the ratio is a local test. The path stops if the clearing price is nonunique or outside the selected price range. Model reference: QuantEcon.

Follow the cobweb, one leg at a time.

  1. Use the compact editor above the graph to change the functions, parameters or initial price.
  2. Use Play cobweb or Next leg inside the graph. Move horizontally to supply, then vertically to demand to find the next clearing price.
  3. Use Draw 12 periods for an immediate trajectory, or choose the Convergent, Cycle and Divergent presets.

Period-by-period prices and quantities are directly below the graph. Open the model details for the current three-stage calculation and stability explanation.

Custom formulas use p for price and * for multiplication. Supported functions: exp, log, sqrt, abs, min, max. Supply uses pₜ₋₁; demand uses pₜ. The presets share p* = 15 and q* = 60.