PPolySim OS
For K-12 Students · Supply & Demand

Supply & Demand for a comparative-advantage trade

Built for k-12 students learning it in middle or high school. Watch the idea come alive with plain-language steps and everyday examples — perfect for projects and homework. Simulate a comparative-advantage trade live below — adjust the inputs and watch it respond, right in your browser.

Supply & DemandLive

Controls

Presets

Where the downward demand curve crosses the upward supply curve, the market clears: that price and quantity are the equilibrium. Shifting either curve moves it. The shaded triangles are consumer and producer surplus — the total gains from trade. A per-unit tax lifts the supply curve, raising price, cutting quantity, and creating deadweight loss.

▶ Run in Python

Data Inspector

Equilibrium price$60.0
Equilibrium qty40.0
Consumer surplus800
Producer surplus800

Governing equation

Reading this result: At the free-market equilibrium of $60.0, 40.0 units clear and the combined surplus (1600) is maximized.

Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.

or unlock everything with Pro →

More with Supply & Demand

Frequently asked questions

Is this good for k-12 students?
Yes — this version of "Supply & Demand for a comparative-advantage trade" is framed for k-12 students learning it in middle or high school. Watch the idea come alive with plain-language steps and everyday examples — perfect for projects and homework.
Do I need to install anything?
No. It runs in any modern browser, free, with no account required.