Explore how supply and demand curves create market equilibrium. Apply price controls, taxes, and subsidies to observe surplus, deadweight loss, and price elasticity effects.
Demand: Q_d = a − b·P. Supply: Q_s = c + d·P. Equilibrium: P* = (a−c)/(b+d), Q* = (ad+bc)/(b+d). Consumer surplus = ½·(a/b − P*)·Q*. Producer surplus = ½·(P* − c/d)·Q*. Price ceiling below P* creates shortage. Per-unit tax shifts supply up, reducing Q* and creating deadweight loss.
A price ceiling set below equilibrium prevents the market from clearing: Q_d > Q_s (shortage). Deadweight loss = ½·|tax|·|Q_eq − Q_control| represents value destroyed. The tax burden splits between consumers and producers depending on price elasticity. More elastic demand = producers bear more of the tax.
Price elasticity of demand Ed = −(dQ/dP)·(P/Q) = −b·P/Q. Elastic demand (|Ed|>1): large quantity response to price change. Inelastic (|Ed|<1): small response. The slope b controls elasticity in this linear model. Try the "Elastic Demand" preset to see how a steeper demand curve affects surplus and tax incidence.