✦ Simulator

Where prices come from, and what breaks them.

Supply and demand is the most famous diagram in economics, and also the most misunderstood. Put a price ceiling on rent or a price floor under wages and watch exactly where the damage shows up, and who ends up paying for it.

The market
Shaded areas are value created. The red wedge is value destroyed.
market price
$0
units traded
0
Demand Supply
Intervention
Pick a policy, then drag it and watch the diagram.
Surplus ledger
Who captures the value in this market.
Consumer surplus $0
Producer surplus $0
Value created $0
Deadweight loss $0
The curves
Move these to change how the market reacts.
$
$
Low means buyers keep buying whatever the price does. High means they walk away fast.
Low means supply is stuck no matter the price. High means sellers pile in when it rises.
How the model works

The two curves

Both are straight lines. Demand starts at the highest price anyone would pay and slopes down. Supply starts at the lowest price any seller would accept and slopes up. Qd = Ed·(Pmax − P), Qs = Es·(P − Pmin)

Equilibrium

The clearing price is where the quantity demanded equals the quantity supplied. It is a weighted average of the two extreme prices, weighted by how responsive each side is. P* = (Ed·Pmax + Es·Pmin) / (Ed + Es)

Surplus

Consumer surplus is the gap between what buyers would have paid and what they did pay. Producer surplus is the gap between what sellers accepted and their lowest acceptable price. Both are areas on the diagram.

Deadweight loss

Trades that would have benefited both sides but no longer happen. Nobody captures this value. It is not transferred, it simply stops existing, which is why it is drawn as a separate wedge.

What you are actually watching

The supply and demand diagram gets drawn on a million whiteboards a year, usually badly. Here is what the shapes mean, what equilibrium actually is, and why economists get so agitated about the red triangle.

The curves are queues, not laws

A demand curve is just everybody who wants the thing, lined up from the person willing to pay most down to the person who would only take it if it were nearly free. A supply curve is sellers lined up from whoever can produce most cheaply to whoever can barely be bothered.

The price settles where the two queues meet, and that crossing point is the equilibrium. Everyone to the left of it trades and is glad they did. Everyone to the right walks away, because for them the deal was never worth it. Nothing is being planned here. The equilibrium price is a byproduct of two queues finding each other.

The shaded areas are the point

The blue wedge is consumer surplus: the difference between what buyers would have been willing to pay and what they actually paid. If you would have paid $18 and got it for $10, you personally banked $8 of it.

The green wedge is producer surplus, the same idea from the other side. Together they measure how much value this market creates by existing. Free markets maximize that combined area, which is why economists reach for them by default.

Why rent control is the classic cautionary tale

Load the rent control scenario and drag the ceiling down. Notice what does not happen: the apartments do not get cheaper to build. What happens instead is that fewer get supplied while more people want one, and the difference is the shortage.

The tenants who keep an apartment do win, and they win a lot. That is why rent control is popular, and pretending otherwise is bad economics. But the people who never find an apartment are invisible in the political conversation, and the red wedge is exactly them: trades that would have made both sides better off and now do not happen.

The same logic runs in reverse for a price floor such as a minimum wage, where the unsold surplus is people who want work at that wage and cannot find it. How large that effect is depends entirely on responsiveness, which is why economists argue about elasticity rather than about the diagram itself.

Nobody cares who the tax is levied on

Load the sales tax scenario. The tax is nominally paid by sellers, and yet buyers end up absorbing about 80% of it. Flip the two responsiveness sliders and the burden flips with them.

Economists call this tax incidence, and it is one of the most useful results in the field: the side that can walk away more easily pays less of the tax. Legal responsibility is irrelevant. If demand is stubborn, as it is for petrol or cigarettes, buyers eat the tax no matter whose name is on the paperwork. It is also why taxing something inelastic raises lots of revenue and destroys relatively little surplus, which is a useful thing for a treasury to know.

What deadweight loss actually is

The red wedge is not money moving from one pocket to another. A price ceiling transfers surplus from sellers to buyers, and a tax transfers it to the government, and those are transfers, not losses. Whether you like them is a question about fairness, not efficiency.

Deadweight loss is different. It is the value of trades that simply stop happening. A buyer who would happily have paid $12 and a seller who would happily have accepted $9 both go home with nothing. That $3 of value does not go anywhere. It ceases to exist.

That is why the triangle gets so much attention. Arguing about transfers is politics. The triangle is the part where everybody loses at once.

Things to try

Each one takes about thirty seconds and teaches something the diagram alone will not.

1Make the ceiling harmless

On rent control, drag the ceiling above the market rent. Nothing happens at all. A price control only does something when it fights the market, which is worth remembering when one gets proposed.

2Find who pays the tax

On the sales tax, set buyer responsiveness to 0.5 and seller responsiveness to 10. Now reverse them. Same tax, opposite victim, and the government collects the same either way.

3Shrink the triangle

Keep a tax fixed and lower both responsiveness sliders. Deadweight loss shrinks toward nothing. This is the real argument behind taxing land and inelastic goods.

4Break the labour market

On minimum wage, raise seller responsiveness to 10. Far more people want the job than there are jobs. The wage did not change, only how eagerly people respond to it.

Common questions about supply and demand

Does this mean price controls are always bad?

No, and the diagram cannot answer that. It measures the size of the pie, not how it is sliced. A rent ceiling really does help the tenants who keep their apartment, and if you care about those people more than about total surplus, that is a values judgement rather than an error. What the model does tell you is the price of the policy: the shortage and the lost trades. Good arguments about price controls start after you know that number, not instead of knowing it.

What is elasticity, in plain terms?

How much people change their behavior when the price moves. Inelastic means barely at all, like insulin or petrol for a commuter. Elastic means a lot, like one brand of cereal among twenty. The responsiveness sliders here control exactly this, and the elasticity readout underneath the ledger reports it as the standard number economists quote.

Why are the curves straight lines?

Simplicity. Real demand and supply curves bend, and the elasticity changes as you move along them. Straight lines keep the areas easy to see and calculate while preserving every qualitative result: shortages, surpluses, incidence, and deadweight loss all behave the same way. No conclusion here depends on the lines being straight.

Who actually gets the good under a price ceiling?

The model assumes the buyers who value it most, which is the standard textbook assumption and the most generous one. Reality is usually worse: goods get rationed by queueing, luck, or connections, which means some units go to people who value them less. That makes the real deadweight loss larger than what is drawn here, not smaller.

About this model: linear supply and demand with a per unit tax and single price controls, assuming a competitive market, efficient rationing, and no externalities, income effects, or search costs. Those assumptions are exactly the ones real policy debates fight over, so treat this as a tool for understanding the mechanism rather than a verdict on any particular policy.