- A country has a comparative advantage in a good when it can produce it at a lower opportunity cost than another country. Absolute advantage only means producing more with the same resources.
- Opportunity cost of good X (output data) \( = \dfrac{\text{output of Y}}{\text{output of X}} \). With input data you flip it: \( \dfrac{\text{input for X}}{\text{input for Y}} \).
- Key result (Ricardo, 1817): two countries gain from trade even if one is better at producing everything, as long as their opportunity costs differ.
- Trade benefits both sides only if the terms of trade lie between the two countries’ opportunity cost ratios.
- Exam point: always evaluate. The theory assumes constant costs, no transport costs and full employment, and specialising in primary commodities can leave developing countries exposed.
What is comparative advantage?
Comparative advantage is the idea that a country should specialise in the goods it gives up the least to produce, then trade for the rest. It explains why countries trade even when one is more productive at everything.
Absolute advantage: Adam Smith
Adam Smith argued in The Wealth of Nations (1776) that a nation should not make at home what it can buy more cheaply abroad: “If a foreign country can supply us with a commodity cheaper than we ourselves can make it, better buy it of them with some part of the produce of our own industry, employed in a way in which we have some advantage.”[1] But what if one country is better at producing both goods? Smith’s logic seems to leave the weaker country with nothing to offer. Ricardo showed that this is wrong.
Comparative advantage: David Ricardo
In On the Principles of Political Economy and Taxation (1817), chapter 7 “On Foreign Trade”, Ricardo used England and Portugal producing cloth and wine. In his example, cloth takes the labour of 100 men for a year in England and 90 men in Portugal; wine takes 120 men in England and 80 men in Portugal.[2] Portugal needs fewer workers for both goods, so it has an absolute advantage in both. Yet Ricardo showed that both countries still gain if England makes cloth and Portugal makes wine. What matters is not who is best at each good, but who is relatively best, which is measured by opportunity cost.
How to calculate comparative advantage: the formula
Exam data comes in two forms, and the formula depends on which one you have.
Output method (units produced from given resources)
The table tells you how much of each good a worker, or a fixed amount of resources, can produce. The rule is “the other good over this good”:
Input method (resources needed per unit)
The table tells you how many workers, hours or days are needed to make one unit. Now the rule is “this good over the other good”:
Why is the input rule upside down? If cloth takes 100 workers and wine takes 120, moving 100 workers into cloth loses \( \tfrac{100}{120} \) of a unit of wine.
Input method in action: Ricardo’s own numbers
| Labour needed for one unit (men per year) | Cloth | Wine |
|---|---|---|
| England | 100 | 120 |
| Portugal | 90 | 80 |
Source: Ricardo (1817), chapter 7.[2]
Using the input method, find each country’s opportunity costs and comparative advantage.
Portugal is absolutely better at both goods, but England gives up less wine for each unit of cloth. So England should make cloth and Portugal should make wine, exactly as Ricardo concluded.
Fully worked two-country example: gains from trade
Now the output method, with the gains from trade. The numbers are illustrative.
Suppose two countries, Northland and Southland, each have 100 worker-days of labour. One worker-day produces the following amounts.
| Output per worker-day | Wheat (tonnes) | Cloth (rolls) |
|---|---|---|
| Northland | 40 | 20 |
| Southland | 10 | 15 |
(a) Identify absolute and comparative advantage. (b) Show that specialisation raises world output. (c) Find the range of mutually beneficial terms of trade. (d) Show that both countries gain when they trade at 1 roll of cloth = 1 tonne of wheat.
Both countries end up consuming more of both goods than they could make on their own, even though Southland is less productive at everything. That is the power of comparative advantage.
The terms of trade rule in general
For a two-good model, the condition for mutually beneficial trade is:
Where the terms of trade settle within that band decides how the gains are shared. At 1 cloth = 1 wheat, Northland gains 750 wheat and 50 cloth, while Southland gains 250 wheat and 50 cloth. At 1 cloth = 1.5 wheat, more of the gain would shift to Southland. Outside the band, one country is better off not trading.
You can check the same answer with input data. Northland needs \( \tfrac{1}{40} \) of a day per tonne of wheat and \( \tfrac{1}{20} \) per roll of cloth. Using the input rule, 1 cloth costs \( \dfrac{1/20}{1/40} = 2 \) wheat, which matches Step 2.
Comparative advantage on a PPC diagram
A production possibility curve (PPC) shows every combination of two goods a country can make with all its resources. With constant opportunity costs the PPC is a straight line, and its slope is the opportunity cost.
Northland panel. A straight-line PPC runs from 4,000 wheat on the vertical axis to 2,000 cloth on the horizontal axis. Its slope is \( -2 \): each extra roll of cloth costs 2 tonnes of wheat. Mark the autarky point A at (800 cloth, 2,400 wheat) on the PPC. Mark the production point P at (0 cloth, 4,000 wheat), the vertical intercept. Draw a flatter trading possibility line from P with slope \( -1 \) (the 1 : 1 terms of trade), reaching the horizontal axis at 4,000 cloth. Mark the consumption point C at (850 cloth, 3,150 wheat). C lies outside the PPC, to the north-east of A.
Southland panel. A straight-line PPC runs from 1,000 wheat on the vertical axis to 1,500 cloth on the horizontal axis. Its slope is \( -\tfrac{2}{3} \): each extra roll of cloth costs 0.67 wheat. Mark A at (600 cloth, 600 wheat). Mark P at (1,500 cloth, 0 wheat), the horizontal intercept. Draw the trading possibility line from P with slope \( -1 \), reaching the vertical axis at 1,500 wheat. Mark C at (650 cloth, 850 wheat), again outside the PPC and north-east of A.
What to label. The gap between each PPC and its trading line is the gain from trade. The trading line lies between the two PPC slopes, showing that the terms of trade lie between the opportunity costs.
Assumptions and limitations of the Ricardian model
The model’s simplicity gives you plenty to evaluate. Its main assumptions are:
- Constant opportunity costs. In reality costs rise as a country specialises and uses less suitable land and workers, so specialisation is usually partial.
- No transport costs or trade barriers. Shipping, tariffs and quotas eat into the gains and can prevent trade altogether.
- Perfect factor mobility within a country. A textile worker cannot become a farmer overnight, so specialisation causes structural unemployment.
- Full employment. Gains appear only if the freed-up resources are re-employed.
- Two countries, two goods, one factor (labour). Reality has many goods, countries and factors.
- Static analysis. Opportunity costs are taken as given, ignoring how investment and education can create new comparative advantages.
- National gains hide losers. Winners could compensate losers, but nothing ensures they will.
Heckscher–Ohlin: where does comparative advantage come from?
Ricardo did not explain why productivity differs. The Heckscher–Ohlin model, developed by Eli Heckscher and his student Bertil Ohlin, answers this with factor endowments.[3] Ohlin later shared the 1977 Nobel Memorial Prize in Economic Sciences, partly for this work on international trade.[4]
The prediction is that a country exports goods that use its abundant factor intensively. A labour-abundant country exports labour-intensive goods such as clothing. A country rich in oil reserves exports oil. The theory has been heavily tested. The best-known challenge, the “Leontief paradox”, found that US exports in 1947 appeared to be less capital-intensive than US imports, the opposite of what the model predicts for a capital-rich country.[5] The paradox is a useful evaluation point: endowments alone do not fully explain trade.
Comparative advantage in real-world data: Bangladesh and Saudi Arabia
Opportunity costs cannot be observed directly, so economists look at what countries actually export. Bela Balassa proposed the index of revealed comparative advantage (RCA).[6]
An RCA above 1 means the country exports proportionally more of that good than the world average, which suggests a comparative advantage. An RCA below 1 suggests a comparative disadvantage.
Saudi Arabia: oil
Saudi Arabia is the textbook example of an endowment-driven comparative advantage. According to World Bank data, fuels made up 79.4% of its merchandise exports in 2024, compared with 11.2% for the world as a whole.[7] That gives:
Saudi Arabia exports fuel at about seven times the world average intensity. The chart shows that the fuel share has drifted down from around 90% in the mid-2000s, while the manufactures share (largely petrochemicals and plastics) has risen.[7][8] The 2020 dip reflects that year’s oil price collapse: export shares measured in value move with prices as well as quantities.
Bangladesh: ready-made garments
Bangladesh is a classic labour-abundant economy, just as Heckscher–Ohlin would predict. Manufactures, overwhelmingly clothing, made up 94.5% of its merchandise exports in 2018, the latest year in the World Bank series.[8] WTO data reported for 2024 put Bangladesh’s apparel exports at USD 38.48 billion, about 6.9% of a world apparel market of USD 557.5 billion, making it the second-largest exporter after China.[10] Bangladesh’s total merchandise exports in 2024 were about USD 47.2 billion, and world merchandise exports were about USD 24.6 trillion.[9] An approximate RCA is therefore:
That is a very strong revealed comparative advantage. The figure combines two sources, so treat it as approximate.
| Indicator | Saudi Arabia | Bangladesh | World |
|---|---|---|---|
| Fuel, % of merchandise exports (2024) | 79.4[7] | 1.1 (2018)[7] | 11.2[7] |
| Manufactures, % of merchandise exports | 15.9 (2024)[8] | 94.5 (2018)[8] | n/a |
| Merchandise exports, USD billion (2024) | 305.5[9] | 47.2[9] | 24,622[9] |
| Approximate RCA in main export | about 7 (fuel) | about 36 (apparel) | 1 by definition |
Does the theory hold in the data more generally? Testing Ricardo directly is hard because you only see productivity in the goods a country actually makes. Two well-known studies get around this. Bernhofen and Brown used Japan’s sudden opening to trade in the 1850s and 1860s as a natural experiment, and found that the pattern of trade fitted comparative advantage.[14] Costinot and Donaldson used agronomic data on potential crop yields and found that farm output across countries and crops lines up with Ricardian predictions.[15]
Comparative advantage and development: the case for caution
For many poor countries, comparative advantage points towards primary commodities: crops, minerals and fuels. That raises development concerns.
Commodity dependence is widespread. UNCTAD defines a country as commodity-dependent when more than 60% of its merchandise exports are commodities. During 2021–2023, 95 of 143 developing economies met that definition.[11]
Prices are volatile. Commodity prices swing more than manufactured goods prices because supply and demand are price-inelastic in the short run. Export earnings and government revenue swing with them.
The Prebisch–Singer hypothesis. Writing separately in 1950, Raúl Prebisch and Hans Singer argued that the prices of primary commodities tend to fall over the long run relative to the prices of manufactured goods.[12][13] If so, a country exporting commodities and importing manufactures faces worsening terms of trade: it must export more and more to buy the same imports. Reasons include the low income elasticity of demand for food and raw materials. A widely cited World Bank study by Grilli and Yang found a long-run decline in the prices of primary commodities relative to manufactures across most of the twentieth century, broadly supporting the hypothesis.[16]
Static versus dynamic advantage. Ricardo’s model takes comparative advantage as fixed. But South Korea, Taiwan and later China moved from low-skill to high-technology exports over a few decades. Supporters of industrial policy argue that comparative advantage can be built, not just discovered; critics reply that governments are poor at picking winners. Bangladesh has escaped commodity dependence, but now relies heavily on a single, low-margin manufacturing sector.
Evaluation: how useful is comparative advantage?
Strengths. The theory explains why trade is not a zero-sum game. Even a low-productivity country gains from trade. Empirical tests, from Japan in the 1850s to modern crop data, support its core prediction.[14][15]
Weaknesses. The assumptions are strong: constant costs, no transport costs, mobile factors, full employment. Gains at national level hide losers within the country. The model is static and can lock developing countries into commodities with volatile and possibly declining terms of trade. It also ignores economies of scale, which explain much trade between similar rich countries.
Judgement. Comparative advantage is best seen as a strong argument against self-sufficiency rather than a complete guide to what a country should produce forever. The gains are real, but how they are shared depends on the terms of trade, support for displaced workers, and whether a country can upgrade its comparative advantage.
Practice questions
EasyQ1. Explain the difference between absolute advantage and comparative advantage. Show worked answer
Absolute advantage means a country can produce more of a good than another country with the same resources. Comparative advantage means a country can produce a good at a lower opportunity cost. A country can have an absolute advantage in both goods but a comparative advantage in only one. Gains from trade depend on comparative, not absolute, advantage.
EasyQ2. In one day, a worker in country A makes 12 phones or 6 shirts. Calculate A’s opportunity cost of one shirt. Show worked answer
This is output data, so opportunity cost of a shirt \( = \dfrac{\text{output of phones}}{\text{output of shirts}} = \dfrac{12}{6} = 2 \) phones. One phone costs \( \tfrac{6}{12} = 0.5 \) shirts.
MediumQ3. It takes 4 hours to make a table and 2 hours to make a chair in country X. In country Y it takes 6 hours for a table and 2 hours for a chair. Which country has the comparative advantage in tables? Show worked answer
This is input data, so opportunity cost of a table \( = \dfrac{\text{hours for table}}{\text{hours for chair}} \).
X: \( \tfrac{4}{2} = 2 \) chairs. Y: \( \tfrac{6}{2} = 3 \) chairs.
X has the lower opportunity cost, so X has the comparative advantage in tables. Y has the comparative advantage in chairs (Y: \( \tfrac{2}{6} = 0.33 \) tables per chair, X: \( \tfrac{2}{4} = 0.5 \)).
MediumQ4. Using the Northland and Southland data above, would trade at 1 cloth = 2.5 wheat benefit both countries? Explain. Show worked answer
No. The mutually beneficial range for 1 cloth is between 0.67 and 2 wheat. At 2.5 wheat, Northland would pay more for imported cloth than the 2 wheat it costs to make cloth itself, so Northland would rather produce its own cloth.
ExamQ5. Evaluate the view that developing countries should specialise according to their comparative advantage. [15 marks] Show worked answer
Knowledge and understanding (up to 4 marks). Define comparative advantage as lower opportunity cost. Explain Ricardo’s result that both countries gain when they specialise and trade within the terms-of-trade range. A numerical example or PPC diagram earns credit.
Analysis (up to 5 marks). Specialisation raises world output and lets countries consume beyond their PPC. Export earnings pay for imported capital goods. Use real data: Bangladesh’s garment exports (an RCA of roughly 36) and the jobs they created.
Evaluation (up to 6 marks). Comparative advantage often lies in primary commodities; 95 of 143 developing economies were commodity-dependent in 2021–2023. Commodity prices are volatile, and the Prebisch–Singer hypothesis suggests their terms of trade decline over time. The model is static: East Asian economies built new comparative advantages. Unrealistic assumptions and adjustment costs create losers, and single-product dependence (Saudi oil, Bangladeshi garments) raises risk. Judgement: specialisation brings real gains, but developing countries benefit most when they combine it with diversification, investment in skills and policies that help them move up the value chain.
Frequently asked questions
Can a country have a comparative advantage in both goods?
No. In a two-good model, if a country’s opportunity cost of one good is lower, its opportunity cost of the other good must be higher. It can have an absolute advantage in both, but a comparative advantage in only one.
How do you calculate comparative advantage from a table?
First decide whether the table shows output or input. For output data, the opportunity cost of X is output of Y divided by output of X. For input data, it is input for X divided by input for Y. The country with the lower opportunity cost has the comparative advantage.
What are the terms of trade in comparative advantage?
They are the rate at which the two goods exchange. Trade benefits both countries only if the terms of trade lie between the two countries’ opportunity cost ratios.
Who came up with comparative advantage?
David Ricardo set out the theory in On the Principles of Political Economy and Taxation (1817), using England and Portugal trading cloth and wine. Adam Smith had earlier described absolute advantage (1776).
References
- Smith, A. (1776). An Inquiry into the Nature and Causes of the Wealth of Nations, Book IV, Chapter II. London: W. Strahan and T. Cadell. Online edition, Library of Economics and Liberty. https://www.econlib.org/library/Smith/smWN.html
- Ricardo, D. (1817). On the Principles of Political Economy and Taxation, Chapter 7 “On Foreign Trade”. London: John Murray. Online edition, Library of Economics and Liberty. https://www.econlib.org/library/Ricardo/ricP.html
- Ohlin, B. (1933). Interregional and International Trade. Cambridge, MA: Harvard University Press. https://dspace.gipe.ac.in/xmlui/handle/10973/21287
- The Nobel Prize (1977). “Bertil Ohlin: Biographical”. NobelPrize.org. https://www.nobelprize.org/prizes/economic-sciences/1977/ohlin/biographical/
- Leontief, W. (1953). “Domestic Production and Foreign Trade: The American Capital Position Re-Examined”. Proceedings of the American Philosophical Society, 97(4), 332–349. https://www.jstor.org/stable/3149288
- Balassa, B. (1965). “Trade Liberalisation and ‘Revealed’ Comparative Advantage”. The Manchester School, 33(2), 99–123. https://doi.org/10.1111/j.1467-9957.1965.tb00050.x
- World Bank (2026). “Fuel exports (% of merchandise exports)” (TX.VAL.FUEL.ZS.UN), World Development Indicators. https://data.worldbank.org/indicator/TX.VAL.FUEL.ZS.UN
- World Bank (2026). “Manufactures exports (% of merchandise exports)” (TX.VAL.MANF.ZS.UN), World Development Indicators. https://data.worldbank.org/indicator/TX.VAL.MANF.ZS.UN
- World Bank (2026). “Merchandise exports (current USD)” (TX.VAL.MRCH.CD.WT), World Development Indicators. https://data.worldbank.org/indicator/TX.VAL.MRCH.CD.WT
- The Daily Star (2025). “Bangladesh retains second largest apparel exporter spot in 2024” (reporting World Trade Organization data). https://www.thedailystar.net/business/news/bangladesh-retains-second-largest-apparel-exporter-spot-2024-3934636
- UNCTAD (2025). State of Commodity Dependence 2025. Geneva: United Nations Conference on Trade and Development. https://unctad.org/publication/state-commodity-dependence-2025
- Prebisch, R. (1950). The Economic Development of Latin America and its Principal Problems. New York: United Nations, Economic Commission for Latin America. https://repositorio.cepal.org/handle/11362/29973
- Singer, H. W. (1950). “The Distribution of Gains between Investing and Borrowing Countries”. American Economic Review, 40(2), 473–485. https://www.jstor.org/stable/1818065
- Bernhofen, D. M. and Brown, J. C. (2004). “A Direct Test of the Theory of Comparative Advantage: The Case of Japan”. Journal of Political Economy, 112(1), 48–67. https://doi.org/10.1086/379944
- Costinot, A. and Donaldson, D. (2012). “Ricardo’s Theory of Comparative Advantage: Old Idea, New Evidence”. American Economic Review, 102(3), 453–458. https://doi.org/10.1257/aer.102.3.453
- Grilli, E. R. and Yang, M. C. (1988). “Primary Commodity Prices, Manufactured Goods Prices, and the Terms of Trade of Developing Countries: What the Long Run Shows”. The World Bank Economic Review, 2(1), 1–47. https://doi.org/10.1093/wber/2.1.1

