Two countries can both gain from trade even if one is better at everything.
It sounds wrong: if Portugal makes both wine and cloth more efficiently than England, why trade? David Ricardo showed in 1817 that what matters is not who is best, but who gives up least. It is often called one of the most powerful yet counter-intuitive ideas in economics.
Adam Smith had explained trade through absolute advantage: buy from abroad whatever others make more cheaply than you. That leaves a puzzle. What if one country is more productive at everything? The answer, comparative advantage, appeared in an anonymous pamphlet in 1814 and in Robert Torrens's work in 1815, but David Ricardo's 1817 book On the Principles of Political Economy and Taxation gave it its classic form.
Ricardo imagined England and Portugal each making wine and cloth. Portugal is better at both. But the relative costs differ. In his numbers, England needs 220 hours of labour to make one unit of each good; Portugal needs 170. England is relatively better at cloth, Portugal relatively better at wine. If England spends all 220 hours on cloth, it makes 2.2 units; if Portugal spends its 170 on wine, it makes about 2.1. Total output of both goods rises, and after trading, both countries can consume more than they could alone.
The key concept is opportunity cost: what you give up to make something. Even a country that is better at everything faces trade-offs, and it gains by focusing where its trade-off is smallest and buying the rest. The same logic applies not just to countries but to firms and individuals, which is why the principle reaches far beyond trade policy.
Ricardo's model rests on assumptions, notably that capital and workers do not move between countries. If they could move freely, the model suggests both goods might simply be made in the more efficient country. The first empirical test came from G. D. A. MacDougall in 1951 and 1952. The idea's lasting insight is that trade is not a contest to be the best at everything.
Source: Wikipedia — Comparative advantage · Text summarised from Wikipedia (CC BY-SA 4.0)