Imagine you are better than your assistant at everything: faster at typing, faster at filing, faster at everything on the list. Should you still hand them anything? Intuition says no, because why pay for slower work? Yet almost every economist since the early 1800s says yes. The idea is called comparative advantage, and the interactive below lets you break it, then fix it.

Better at everything, and still worth trading with

David Ricardo's 1817 example used England and Portugal, cloth and wine. The numbers below are the labour hours needed per unit of each good, as usually quoted from his table.

ClothWine
England100120
Portugal9080

Portugal needs fewer hours for both goods, so it has the absolute advantage in both. England is worse at everything. Surely there is nothing to gain from trade?

The trick is what each choice costs

Look at the price of cloth in terms of the wine you give up. In England, 100 hours of cloth means forgoing 100/120 = 0.83 units of wine. In Portugal, 90 hours of cloth means forgoing 90/80 = 1.125 units of wine. Cloth is cheaper to make in England, measured in what you sacrifice. Wine is the reverse: a unit of wine costs England 1.2 cloths but Portugal only 0.89.

That sacrifice is the opportunity cost, and comparative advantage means the lower opportunity cost. England is relatively less bad at cloth; Portugal is relatively better at wine. Nobody is better at everything once you count what the time could have been used for instead.

Try it yourself

England has 220 labour hours and Portugal has 170, exactly enough for each to make one cloth and one wine on its own. That is the baseline: 2 cloth and 2 wine between them. Slide each country's labour between the two goods and watch the world total.

World cloth
2.00
World wine
2.00
Lime line: the most the two countries can make together. Hollow ring: the no-trade baseline. Dot: your split. Any dot in the shaded corner has more of both goods.

Set England to 100% cloth and Portugal to 0% cloth. England makes 220/100 = 2.2 cloths; Portugal makes 170/80 = 2.125 wines. Compared with 2 and 2, the world is richer by 0.2 cloth and 0.125 wine, from the same 390 hours of work. Now try the wrong way round, with England on wine and Portugal on cloth: the world ends up with less of both. Specialising helps only when each country leans toward its lower opportunity cost.

Where the gain comes from

No one worked harder and no one learned a skill. The gain comes from moving each hour to where it gives up the least. England's cloth hours sacrifice little wine; Portugal's wine hours sacrifice little cloth. Shuffle the work that way and the total rises, which is why the chart has a kinked frontier rather than a straight line: the cheapest switches are used first.

For the trade to suit both sides, the swap rate has to sit between the two countries' opportunity costs, here between 0.83 and 1.125 wine per cloth. At any rate in that range, each side gets its cloth or wine more cheaply than by making it itself.

Where the lesson stops

The model is deliberately bare: two countries, two goods, one input, no transport costs, and workers who move painlessly between jobs. Real specialisation moves jobs and towns, and the gains do not land evenly on everyone. The argument shows that trade can raise the total, not that every person ends up better off without help. The same logic works well outside trade, though: a lawyer who types faster than her assistant should still usually hand over the typing, because her hour is worth more spent on legal work.