✦ Simulator

Worse at everything, better off trading.

A country can be less productive at every single good and still gain from trade. That claim sounds wrong to almost everyone the first time they hear it. Set the numbers yourself and watch it hold.

What each country can consume
The solid line is each country's production possibility frontier, everything it could make alone. The dashed line is what it can consume after specialising and trading. The shaded gap between them is the gains from trade.
Northland
Southland
Terms of trade
The price they agree on. Both sides only say yes inside the green band.
2 4
Opportunity cost
What each country gives up to make one more unit. Lower wins.
To make one more
Northland
Southland
Computers
2
4
Textiles
0.5
0.25
The two economies
What each could produce putting everything into one good.
Northland
Southland
How the model works

Straight-line frontiers

Each country has fixed productivity, so its production possibility frontier is a straight line between making only one good and making only the other. Y = maxY − (maxY / maxX)·X

Opportunity cost

The slope of that line is the opportunity cost. It is how much of the second good must be given up to make one more of the first. cost of 1 X = maxY / maxX

Who specialises in what

Whichever country gives up less of the other good has the comparative advantage. Absolute productivity never enters the comparison, only these ratios.

Terms of trade

Any exchange rate strictly between the two opportunity costs leaves both countries able to consume beyond their own frontier. Outside that band, one of them prefers self-sufficiency.

What you are actually watching

Comparative advantage is the single most counterintuitive idea in introductory economics, and the one most often mangled in public argument. Here is what the model is really saying.

Being better at something is not the point

Load the first preset. Northland can out-produce Southland at computers and at textiles. Every instinct says Northland should make both and Southland has nothing to offer.

Now look at the opportunity cost table. To make one more computer, Northland gives up 2 textiles. Southland gives up 4. So computers are cheaper for Northland to make, measured in what has to be sacrificed. Flip it around and textiles are cheaper for Southland. What matters is what each country gives up, not what it can produce in total.

Where the extra output comes from

Nothing is created out of nothing here. When each country moves its workers into the good it sacrifices least to produce, total world output of both goods rises. The same people and the same resources produce more, because they are pointed at the thing they are relatively best at.

That extra output has to be shared, which is what the exchange rate does. The dashed lines on the charts sit outside each country's own production possibility frontier, and consuming beyond what you can produce is impossible on your own. That gap is what economists call the gains from trade.

The price has to suit both sides

Drag the terms of trade slider out of the green band and watch a country stop gaining. Trade only happens when the exchange rate falls between the two opportunity costs, because outside that range one side does better ignoring the other and producing for itself.

Inside the band, where exactly the price lands decides how the gains are split. Push it toward one country's opportunity cost and that country captures almost nothing, while its partner takes nearly everything. The theory says both gain. It says very little about who gains more, which is roughly what trade negotiations are actually about.

When trade does nothing at all

Load the last preset. Eastland is twice the size of Westland, but both give up the same two units of grain per unit of steel. The green band collapses to a point, and no exchange rate benefits anyone.

This is the honest limit of the model. Gains come from differences in opportunity cost, not from size, wealth, or productivity. A large rich country and a small poor one with identical trade-offs have nothing to offer each other here.

What the model leaves out

The result is real, and it is also narrower than it is usually made to sound. This model has two goods, one input, no transport costs, no economies of scale, and workers who move between industries instantly and at no cost.

That last assumption carries most of the weight in real arguments. The model says a country gains in total. It does not say every person gains, and it says nothing about a textile worker whose factory closes while the gains land somewhere else in the economy. Compensating losers is a policy question the diagram cannot answer, and skipping past that is why the idea gets a worse reputation than the maths deserves.

Things to try

Each one takes a few seconds and settles an argument people actually have.

1Make one country hopeless

Cut Southland's numbers to a fraction of Northland's, keeping the ratio between its two goods unchanged. Both still gain by exactly the same proportion. Absolute productivity simply does not enter the result.

2Squeeze one side

Drag the exchange rate to the very edge of the green band. Trade still happens, but one country captures nearly all the gains. This is what a lopsided trade deal looks like.

3Erase the advantage

Adjust the numbers until both countries have the same opportunity cost. The green band vanishes and so do the gains, no matter how large either economy is.

4Widen the gap

Make the two opportunity costs as different as possible. The band grows and the shaded gains balloon. Bigger differences mean more to gain from trading.

Common questions about comparative advantage

What is the difference between absolute and comparative advantage?

Absolute advantage means producing more of something with the same resources. Comparative advantage means producing it at a lower opportunity cost, meaning you sacrifice less of everything else to do it. A country can hold absolute advantage in every good, but it cannot hold comparative advantage in every good, because giving up less of one thing necessarily means giving up more of another.

How can a country worse at everything still gain?

Because its own internal trade-offs still differ from its partner's. Even a less productive country sacrifices relatively less to make some particular good, and specialising in that good while trading for the rest lets both sides consume beyond what they could produce alone. The gain comes from differences in ratios, not from anyone being good at anything in absolute terms.

Who decides the terms of trade?

The model does not. It only tells you the range of exchange rates that both sides would accept, bounded by the two opportunity costs. Where the price settles inside that range determines how the gains are divided, and that comes down to bargaining power, market size, and negotiation rather than economics. This is why the theory can say trade helps both countries while saying nothing about fairness.

Does this prove free trade is always good?

No. It shows that trade can increase total output, which is a real and important result. But it assumes no transport costs, no economies of scale, and workers who instantly move between industries. It also describes gains to a country as a whole, not to every individual in it. Whether the people who lose their industry get compensated is a policy choice that sits entirely outside this model.

About this model: the standard Ricardian setup with two countries, two goods, one factor of production, constant opportunity costs, no transport costs, no economies of scale, and full employment. Real trade involves many goods, many inputs, increasing returns, and adjustment costs that fall unevenly on particular workers and regions. Use this to understand why the gains exist, not to settle any specific trade policy.