Presets
Playback
Demand
Straight-line demand Qd = a - b P.
Supply
Straight-line supply Qs = c + d P.
Policy and dynamics
Layers
Model checks
The science
Linear market model
Buyers demand Qd = a - b Pb units and sellers supply Qs = c + d Pp, where Pb is what buyers pay and Pp what sellers receive. Without a tax the market clears where the curves cross:
P* = (a - c) / (b + d) Q* = c + d P*A shift of the demand intercept a (income, tastes, population) or the supply intercept c (input costs, technology) moves the equilibrium along the other curve.
Price adjustment
The animated price follows a simple tatonnement rule dP/dt = λ (Qd - Qs): a shortage pushes the price up, a surplus pushes it down. Random demand shocks follow an Ornstein-Uhlenbeck-like process.
Taxes, surplus and deadweight loss
A per-unit tax t drives a wedge Pb = Pp + t. Solving gives Pp = (a - c - b t)/(b + d). The share paid by buyers is d/(b + d): the more elastic side escapes the tax. Consumer surplus is the area under demand above the price, producer surplus the area above supply below the price, and the lost trades form the deadweight loss triangle:
DWL = ½ t ΔQ = t2 b d / [2 (b + d)]Price controls
A binding ceiling (below P*) leaves a shortage; a binding floor (above P*) leaves a surplus. Welfare is computed assuming the units that do trade go to the buyers who value them most, which is the optimistic case.
Honest simplifications
- Straight-line curves, one good, no income effects, no strategic behaviour.
- Real elasticities change along a curve and over time; short-run and long-run responses differ.
- Surplus is measured in dollars and ignores who the winners and losers are.
What to try
- Per-unit tax: watch the wedge between buyer and seller prices and the red deadweight triangle.
- Inelastic demand tax: buyers now carry most of the tax (check 2 changes accordingly).
- Rent ceiling and Minimum price floor: see the shortage or surplus bracket at the market price.
- Raise random demand shocks and see the price wander around its equilibrium.