Comparative Advantage
Comparative advantage is the idea that countries gain from trade by specializing in what they produce at the lowest relative cost.

Comparative advantage is the idea that two countries both gain from trade when each specializes in the good it produces at the lowest relative cost. The British economist David Ricardo published the argument in 1817, in his book On the Principles of Political Economy and Taxation. Its central claim is surprising: a country that is worse at producing everything still has something worth trading, because what matters is not how it compares to other countries but how the goods compare to each other within each country. Ricardo's idea became the foundation of the case for free trade, and economists still consider it one of the strongest results in their field.
How David Ricardo built the argument
Ricardo was born in London in 1772, the third child of a Sephardic Jewish family that had come from the Netherlands. His father was a successful stockbroker, and Ricardo joined the business at fourteen. At twenty-one he married Priscilla Wilkinson, a Quaker, and his family disowned him for it. He continued trading on his own and proved even more successful than his father. At twenty-seven, on a holiday in Bath, he read Adam Smith's The Wealth of Nations and became fascinated with economics. He made a fortune, including a large profit from betting on British government bonds around the Battle of Waterloo in 1815. He bought Gatcombe Park in Gloucestershire, the same country estate where Princess Anne lives today, and turned to writing full time. He entered Parliament in 1819 and argued for free trade and against the Corn Laws that kept grain prices high. He died in 1823 at fifty-one.
In chapter seven of his 1817 book, Ricardo illustrated the idea with two countries and two goods: Portugal and England, cloth and wine. Portugal could produce both goods with fewer workers. It needed 80 workers to make a unit of wine and 90 to make a unit of cloth. England needed 120 for wine and 100 for cloth. The intuitive conclusion is that Portugal should produce both goods while England imports both. Ricardo showed that this was wrong. Portugal was relatively best at wine, where its advantage over England was largest. England was relatively least bad at cloth. If each country specialized in the good where its relative edge was greatest and traded for the other, both ended up with more of both goods than if each had tried to make everything alone.
What is the difference between comparative and absolute advantage?
A country has an absolute advantage when it can produce a good with fewer resources than another country. In Ricardo's example, Portugal had an absolute advantage in both cloth and wine. A country has a comparative advantage when it produces a good at a lower opportunity cost, meaning it gives up less of the other good to produce it. For every unit of wine Portugal made, it gave up less cloth than England would have, so Portugal had a comparative advantage in wine. For every unit of cloth England made, it gave up less wine than Portugal would have, so England had a comparative advantage in cloth. The distinction matters because absolute advantage tells you who is more productive. Comparative advantage tells you who should specialize in what.
Does everyone in a country gain from trade?
Ricardo's argument is about countries as a whole. It does not say that every person inside a country benefits. When a country opens to trade, it produces more of what it is relatively good at and less of what it is not. Workers and businesses in the growing industries gain. Workers in the shrinking industries lose their jobs.
In a wealthy country that trades with a country with large amounts of cheap labor, the workers most likely to be hurt are the less-skilled workers in industries now exposed to foreign competition. For a long time, most economists assumed those workers would find new jobs fairly quickly. Research by David Autor, David Dorn, and Gordon Hanson challenged that assumption. They studied what happened to American communities after Chinese imports surged in the early 2000s and found that about two million American jobs disappeared. The losses were concentrated in specific towns and lasted more than a decade. Workers in those places did not move on to new industries the way the textbooks predicted. Comparative advantage tells you the cheapest arrangement for a country overall. It does not promise that the gains will reach everyone, or that the people who lose out will be compensated.
Can a country change its comparative advantage?
Comparative advantage is not fixed. A country's advantages grow out of its technology, workforce, investment, and institutions, and each of those can shift over time. South Korea had almost no shipbuilding industry in 1970. The South Korean government identified shipbuilding as a strategic sector, backed it with subsidized loans and purpose-built infrastructure, and by the late 1990s South Korea had overtaken Japan as the world's largest shipbuilder. South Korea followed the same approach with semiconductors. Taiwan built a world-leading chip fabrication industry from nothing. These countries did not wait for comparative advantage to appear on its own. They created it through deliberate government policy.
Whether governments can reliably pick winning industries or succeed only occasionally is still debated. Nothing in Ricardo's theory says it cannot be done.
Comparative advantage and national security
Comparative advantage as a theory does not care where a country's suppliers are. It says to buy from whoever sells most cheaply. But strategic thinking says a country should not depend on a rival for something it cannot do without.
Adam Smith recognized this tension centuries before it dominated the headlines, writing in The Wealth of Nations that "defence is of much more importance than opulence." The same logic shapes trade policy today. Governments that pursue friend-shoring and de-risking, restrict exports of advanced chips, and subsidize domestic semiconductor plants are all paying an efficiency cost as insurance against dependence on a hostile or unreliable supplier. A country that buys its cheapest rare earth minerals from a government that might cut off supply is saving money today and accepting a risk that the theory does not measure.
Comparative advantage identifies the cheapest arrangement. It says nothing about what to do when that arrangement leaves a country dependent on a government willing to exploit the dependence.