An interactive explainer · three simulations · ~15 minutes

If you're better at everything, why trade with anyone?

In 1817, a retired London stockbroker named David Ricardo answered that question with a result so slippery that, a century and a half later, the economist Paul Samuelson nominated it as the only proposition in all of social science that is both true and non-trivial. It is called the law of comparative advantage, and most people who think they know it are actually thinking of something else. This page will not lecture you into believing it. It will let you discover it — by running a tiny economy yourself.

Before we begin — commit yourself

The trap

Two people are shipwrecked on an island: Ada, a wiry ex-competitive-swimmer with quick hands, and Bo, who is, frankly, having a rough week. There are two jobs: spearing fish in the lagoon and gathering coconuts from the grove.

Here is everything you need to know. In one hour, Ada can catch 3 fish or gather 6 coconuts. In one hour, Bo can catch 2 fish or gather 1 coconut. Ada is better at both jobs — 50% faster at fishing, six times faster at gathering.

Lock in your answer · no take-backs
The pair wants as much food as possible. Who should spend their day catching fish?

Your answer is saved. We'll come back to it at the end — after you've run the island yourself.


Simulation 01 · The island economy

Run the island

Each castaway has 8 working hours a day. Your job: divide each person's day between fishing and gathering. To be fed and content, the island needs 16 fish and 24 coconuts per day, combined.

One thing to notice before you touch anything: Bo cannot feed even himself alone. His half of the target — 8 fish and 12 coconuts — would take him 16 hours a day. If this island is going to work, it's not because Bo pulls his weight. It's something stranger than that.

SIM 01 — Allocate the workday Target: 16 fish · 24 coconuts

Ada

3 fish/hr · 6 coconuts/hr
🐟 fishing: 6.0h🥥 gathering: 2.0h

Bo

2 fish/hr · 1 coconut/hr
🐟 fishing: 2.0h🥥 gathering: 6.0h
ProducerFish/dayCoconuts/day
Ada
Bo
Island total
Island target
Fish0 / 16
Coconuts0 / 24
Move the sliders to feed the island.
Ada's frontier Bo's frontier Combined frontier
Each line is a daily menu: every point on it is one way to spend 8 hours. The ✳ marks the island's target. Dots move as you drag the sliders.

The mechanism

Flip the ledger

The trap in your head is a single word: better. You compared Ada's speed to Bo's speed. But the island doesn't pay for speed. Every hour Ada spends in the lagoon is an hour the grove goes unharvested — the true price of anything is what you give up to get it. Economists call it opportunity cost, and it changes who "wins" each job. Flip the table below.

This is the entire secret. Measured in speed, Ada wins every column — that's called absolute advantage, and it turns out to be almost useless for deciding who should do what. Measured in cost, no one can win every column. Ada's fish are expensive precisely because her skill at picking coconuts is so great: sending her to the lagoon burns 6 coconuts an hour. Bo's fish are cheap for the mirror-image reason — his coconut hands are so bad that the grove barely misses him.

And notice: this isn't a lucky feature of our numbers. Opportunity costs are ratios, and ratios come in reciprocal pairs. If Ada's fish cost 2 coconuts, then her coconuts cost ½ fish — whoever is relatively better at one good is automatically relatively worse at the other. Except in one freak case you'll hunt for in Simulation 03, somebody always has the lower cost in each column. Everyone — however slow, however clumsy — is the cheapest producer of something.

The law of comparative advantage · Ricardo, 1817

Total output rises when each producer specializes in the good for which their opportunity cost is lowest — regardless of who is absolutely better at what. Both sides can then gain by trading.

That it is logically true need not be argued before a mathematician; that it is not trivial is attested by the thousands of important and intelligent men who have never been able to grasp the doctrine for themselves or to believe it after it was explained to them. Paul Samuelson, on comparative advantage, answering Stanislaw Ulam's challenge to name one social-science proposition both true and non-trivial

Simulation 02 · The terms of trade

Strike the deal

Specialization creates the surplus; trade decides who eats it. Suppose the castaways specialize — Bo fishes all day (16 fish), Ada gathers all day (48 coconuts) — and Bo offers Ada 8 fish. The only question left is the price: how many coconuts per fish?

Drag the price. Watch when each side walks away — and notice where the walls are.

SIM 02 — Price of one fish, in coconuts 1.00 🥥 / 🐟

The walls of the deal-zone are not arbitrary — they are the two opportunity costs. Below ½ coconut per fish, Bo does better going it alone (his own fishing hour only costs him half a coconut). Above 2, Ada does better catching fish herself. Anywhere strictly between the two costs, both sides end up with more than they could produce solo. Trade isn't charity, and it isn't exploitation — it's the space between two people's prices.

One more thing worth stealing from this chart: the closer the price sits to your own opportunity cost, the smaller your gain. Bo profits most when fish are dear; Ada profits most when fish are cheap. The general version of that is one of the least-appreciated facts in economics: you gain the most from trading with people who are most unlike you. A partner whose costs match yours has nothing to offer — the surplus lives in the gap.


Simulation 03 · The sandbox

Try to break the law

Maybe the island was rigged. Fine — build your own. Set all four production rates to anything you like, and the machine below will hunt for a free lunch: a reshuffle of hours (starting from everyone splitting their day 50/50) that leaves fish output unchanged and coconut output higher. Your challenge: find rates where no free lunch exists.

SIM 03 — Units produced per hour
🐟 Fish / hr🥥 Coconuts / hr Ada
3
6
Bo
2
1

Rates run ½ to 12. The baseline for comparison is each person spending 4 hours on each good.

There is exactly one way to kill the free lunch, and you may have found it with the Twins preset: make the two producers' opportunity costs exactly equal. Not similar — equal to the last decimal. Twins with identical ratios have nothing to trade, because trade feeds on difference, not on skill. Tip any rate by a hair and the lunch reappears. That is what economists mean when they say comparative advantage almost always exists: being worse at everything can't kill it, being better at everything can't kill it. Only being identical kills it — and nobody is identical.


The interference pattern

Why your brain keeps deleting this idea

Here is the diagnosis for why comparative advantage refuses to stick: your head already contains a different, louder idea with a confusingly similar name. Business strategy is built on competitive advantage — Michael Porter's question of how a firm beats its rivals. It is a fine idea. It is also almost the exact opposite of Ricardo's, and it acts like a magnet placed next to a compass.

Competitive advantage

Porter, 1985 · the boardroom's question
  • A contest between rivals selling the same thing
  • Zero-sum: my customer is your lost customer
  • Only the better firm has it; the worse firm should worry
  • Asks: “How do I win?”

Comparative advantage

Ricardo, 1817 · the island's question
  • An exchange between partners making different things
  • Positive-sum: the trade itself mints new surplus
  • Everyone has one — even the party worse at everything
  • Asks: “What should I stop doing?”

Every time you hear "comparative advantage" and reach for "the thing I'm better at than other people," the magnet has captured the compass. The test is one question: better than whom? Competitive advantage compares you to your rivals. Comparative advantage compares your fish to your own coconuts. It is a fact about you and your alternatives, not about you and anyone else's talent.

Objections, and what the law actually says

Myth“Trade only makes sense if you're good at something.”

You never need to be good — you need to be relatively less bad. Bo is a walking catastrophe at both jobs, and the island still gets richer the moment he specializes. His comparative advantage in fishing comes not from his fishing (bad) but from his gathering (worse). Weakness in one thing is the source of cheapness in the other.

Myth“A country (or person) that's best at everything has nothing to gain from trade.”

Run Sim 03 with the "Ada better at everything" preset: the free lunch is still there, and Ada eats part of it. Her gain is real: every fish she buys from Bo for less than 2 coconuts frees an hour she'd otherwise burn in the lagoon at 6 coconuts an hour. The strong party doesn't trade out of pity. It trades because its own time is too valuable to waste on its second-best use.

Myth“My comparative advantage is what I do better than my competitors.”

That's competitive advantage wearing the wrong name badge — you'll see the phrase misused this way in business writing constantly. Your comparative advantage is discovered by comparing your own options: it is the activity whose opportunity cost — to you — is lowest. A mediocre programmer who is a truly terrible salesperson has a comparative advantage in programming, and no competitive advantage anywhere.

Myth“If the other side is desperate or low-wage, the trade must be exploiting someone.”

Sim 02 is the honest picture: between the two opportunity costs lies a whole window of prices where both sides beat their go-it-alone outcome — that's what makes it trade rather than theft. What the price does decide is how the surplus is split, and a party with no outside options may accept a price barely above their cost. The law says the pie gets bigger; it has never promised the slices are fair.

Honest caveatWhat the law does not promise

Ricardo's result is about the size of the total pie, and it is airtight. It is silent on three things people often want it to settle:

Distribution. "The nation gains" does not mean every person in the nation gains. When a country reshuffles toward its comparative advantage, the workers in the shrinking industry really do lose, sometimes for decades, unless the winners compensate them — which is a political choice, not an economic law.

Adjustment. The model reallocates hours instantly. Real people retrain slowly, and towns built around one industry don't glide to the new equilibrium.

Dynamics. Today's opportunity costs aren't destiny. Skills compound: what you practice, you get cheaper at. That's why "specialize where your cost is lowest today" is the beginning of career advice, not the end of it.


Field guide

The law in the wild

The surgeon's keyboard

A surgeon types faster than her scheduler — say 90 words a minute to his 45. Should she do her own admin? Her hour in the operating room is worth thousands; that's the opportunity cost of her typing hour, and it dwarfs his. She "loses" every typing race and should still never enter one. When you hear "don't spend $500-an-hour time on $20-an-hour work," that is comparative advantage — the island with dollar signs.

Ricardo's original numbers

In On the Principles of Political Economy and Taxation (1817), Ricardo imagined England and Portugal trading cloth and wine — and he deliberately made Portugal better at producing both. Portugal needed 90 workers to make cloth England made with 100, and 80 workers to make wine England needed 120 for. Portugal's Ada was England's Bo, and Ricardo showed both countries end up with more cloth and more wine when Portugal makes wine, England makes cloth, and they trade. The scandal of the example — the whole point of the example — is that England, worse at everything, was still worth trading with.

Your calendar, your team, your Tuesday

The founder who still does the bookkeeping, the senior engineer who "just quickly" handles every deploy, the parent who redoes the child's chore because it's faster than watching it done badly — all are winning speed contests and losing ledger flips. The question is never "am I better at this?" (you probably are). It's "what am I not doing while I do this?"

The machines are coming, and Ricardo is oddly calming

The modern version of the trap question: if AI becomes better than you at everything, what could you possibly be for? Notice that this is exactly the Ada question, and Ricardo's answer doesn't care whether Ada is a person. As long as the better party's capacity is finite — compute, energy, attention, anything scarce — its hours have opportunity costs, and it comes out ahead leaving its relatively weakest work to others. Comparative advantage doesn't promise the wages will be wonderful (see the honest caveats above — the price within the window still matters enormously). But "worse at everything" has never once meant "worth nothing to anyone." That was Ricardo's scandal in 1817. It still is.


The final exam

Prove it stuck

Six questions. The last one you've seen before.


Take it with you

The one-sentence version

Do the thing that costs you the least to do — measured in what you give up, not in how good you are — and trade for the rest. So should everyone else. That's it. That's the law.

Glossary

opportunity cost
The true price of an hour: the best thing you didn't do with it. Ada's fishing hour costs 6 coconuts; Bo's costs 1.
absolute advantage
Being flat-out better (faster, more productive) at something. Ada has it in both goods. Surprisingly irrelevant to who should do what.
comparative advantage
Having the lowest opportunity cost for a good. Everyone has one in something (unless opportunity costs are exactly equal — the knife-edge from Sim 03).
competitive advantage
A different idea from business strategy: what lets a firm beat rivals selling the same thing. Zero-sum, Porter, 1985. The magnet next to your compass.
production possibility frontier (PPF)
The menu line in Sim 01: every combination of goods a producer can make with fixed time. Trade is the only way to consume beyond your own line.
terms of trade
The price at which goods exchange — Sim 02's slider. Mutually beneficial anywhere strictly between the two parties' opportunity costs; its position decides how the gains are split.
autarky
Going it alone — no trade, consume only what you produce. The baseline both castaways beat.
gains from trade
The surplus minted by specialization plus exchange: the 24 spare coconuts, the free lunch, the reason both sides said yes.