✦ Simulator

When a tax makes everyone better off.

Markets are very good at weighing costs that somebody actually pays. They are blind to the ones nobody is billed for. Watch what happens when pollution is free, and what a carefully sized tax does about it.

The market and the true cost
The red dashed line is the cost to society, including whatever the market ignores. Where it crosses demand is the amount that should be made.
Market makes
0
Should make
0
Difference
None
What buyers will pay What sellers charge True cost to society
Welfare right now
$0
everything gained, minus the damage
Best possible
$0
wasted right now: $0
The external effect
What each unit does to everyone outside the transaction.
Drag left past zero to make it a benefit instead, like pollination or education.
Negative values are a subsidy.
Who gets what
Adding up every gain and every cost, including the ones outside the market.
Consumer surplus $0
Producer surplus $0
Tax revenue $0
External damage $0
Total social welfare $0
The market itself
The same private supply and demand as the other market sim.
$
$
How the model works

Private costs and benefits

Demand traces the benefit each buyer personally gets. Supply traces what each seller personally gives up. Both are straight lines, exactly as in the supply and demand simulator. MPB = Pmax − Q/Ed, MPC = Pmin + Q/Es

The cost nobody is billed for

An externality adds a fixed amount per unit that falls on people outside the deal. Adding it to private cost gives the true cost to society. MSC = MPC + e

Where the market goes wrong

Trading continues until private benefit equals private cost, but the socially best amount is where private benefit equals social cost. With an external cost the market always goes too far.

The corrective tax

A tax equal to the external cost makes each seller face the damage they cause. The private calculation and the social one then coincide, and the market lands on the right quantity by itself. t = e

What you are actually watching

Externalities are the most common reason a working market still produces the wrong answer, and the Pigouvian tax is the neatest idea in economics for fixing one. Here is why both work the way they do.

Markets only weigh costs somebody pays

A supply curve is built from what producers give up: materials, wages, electricity. It is an honest accounting of every cost that lands on a bill. If making a unit also puts smoke over a neighbourhood, and nobody sends an invoice for it, that cost never enters the calculation.

The red dashed line adds it back. This is the marginal social cost: what a unit truly costs once you count everyone affected, sitting above private supply by exactly the damage per unit. The market clears where demand meets the green line, but the amount society would choose is where demand meets the red one. A working, competitive market landing on the wrong answer like this is what economists call a market failure.

The wasted units are the ones in the middle

Look at the shaded wedge between those two quantities. That is the deadweight loss. Every unit inside it is worth less to the person buying it than it costs the world to produce. They still get made, because the buyer and seller are both individually better off and the loss lands on somebody else entirely.

This is worth being precise about. The problem is not that pollution exists, and the right amount of pollution is almost never zero. The problem is that the last few units are not worth what they cost, and the market has no way to notice.

Why this tax is different

Press "set the corrective tax". The tax comes in at exactly the damage per unit, the market moves to the socially best quantity, and the wasted wedge disappears. Total welfare goes up.

Compare that to the last preset, where there is no externality at all. The same tax now pushes a healthy market away from the right answer and destroys surplus, which is the familiar result from the supply and demand simulator.

Both results are true, and holding them together is the point. A tax on a market that was already efficient causes harm. A tax on a market that was ignoring a real cost repairs it. The tax has not changed, only what it is being applied to. This is the whole argument behind carbon pricing, congestion charges, and tobacco duty.

It runs backwards too

Everything so far has been a negative externality. Drag the slider left, past zero, or load the beekeeping preset, and you get a positive externality instead.

A beekeeper gets paid for honey. The pollination their bees provide to every orchard within flying distance is free, and nobody sends an invoice for it. So the beekeeper decides how many hives to keep based only on what honey earns, ends up keeping fewer than the area actually wants, and the deadweight loss reappears on the other side of the optimum.

The fix is the same formula with the sign flipped: a subsidy equal to the external benefit. That is the reasoning behind subsidised vaccination, public education, and research funding, and it comes from exactly the same diagram.

There is a good footnote to this one. Bees and orchards were the textbook externality for decades, until Steven Cheung went and looked. His 1973 study of Washington State found beekeepers and orchard owners already had contracts, with pollination fees flowing in whichever direction the crop required. The externality had been quietly internalised by people making deals. The diagram identifies a problem. It does not prove that nobody has already solved it.

Why this is harder in practice

Everything here depends on knowing the damage per unit. Setting the tax correctly requires a number for what a tonne of carbon or an hour of congestion actually costs, and those estimates are contested, uncertain, and often political.

The model also assumes the damage is the same for every unit and falls on a tidy anonymous public. Real pollution concentrates in particular places and on particular people. And a tax set too high does its own harm, as the control preset shows. The principle is solid. The number is the hard part, and most real arguments about carbon pricing are arguments about the number rather than the diagram.

Things to try

Four settings, each making a point the formula alone will not.

1Overcorrect on purpose

Set the tax far above the damage. Welfare falls again, this time from producing too little. The goal is matching the externality, not punishing the industry.

2Watch a tax help and hurt

On the pollution preset, set the corrective tax and note welfare rising. Now switch to the no-externality preset with the same tax and watch it fall. Same tax, opposite verdict.

3Make demand stubborn

Drop buyer response to 1 and set the corrective tax. The quantity barely moves. Taxing something people will buy regardless raises revenue but changes little behavior.

4Flip to a benefit

Drag the externality below zero. The market now underproduces, and the tax slider has to go negative to fix it. Subsidies and taxes are the same tool pointed in opposite directions.

Common questions about externalities

What is an externality?

A cost or benefit that falls on someone who is not part of the transaction. Factory emissions are a negative externality, since people downwind bear a cost they never agreed to. Beekeeping is a positive one, since the bees pollinate every orchard nearby and the beekeeper is paid only for honey. In both cases the market price fails to reflect the full effect, so the quantity traded is wrong.

What is a Pigouvian tax?

A tax set equal to the external cost of each unit, named after Arthur Pigou. It forces the person creating the cost to face it, which makes their private calculation match the social one. Unlike an ordinary tax it increases total welfare, because it corrects an error the market was already making rather than introducing one.

Should the optimal amount of pollution be zero?

Almost never, and this surprises people. Eliminating the last unit of pollution usually means giving up production worth more than the damage avoided. The socially best point is where the value of one more unit exactly equals the harm it causes. Zero is the right answer only when the damage is enormous relative to the value of the activity.

Why not just ban the harmful activity?

A ban sets the quantity to zero, which overshoots the optimum in most cases and destroys the surplus from the units that were worth making. A tax lets people who value the activity most continue while those who value it least stop, which reaches the same reduction at a lower cost. Bans make more sense when the damage is severe or when measuring it accurately is hopeless.

About this model: linear supply and demand with a constant external effect per unit, perfect information about the size of that effect, a competitive market, and no transaction costs. Real externalities vary by location and by unit, are difficult to measure, and often involve bargaining, property rights, or regulation rather than a single tax. Use this to understand why the correction works, not to price any particular policy.