Skip to content
Tutorials Center
My learning

Topics

Lesson 28 of 37 ยท International Trade and Exchange Rates

Comparative Advantage and the Gains from Trade

Learn absolute and comparative advantage, compute opportunity costs, and see with a worked example how specialization and trade leave both countries better off.

Why do countries trade? One answer is that they have different resources: some have oil, some have fertile land. But countries also trade when one of them could produce everything more efficiently than the other. The idea behind this surprising fact is comparative advantage, one of the most important results in economics.

This lesson defines absolute and comparative advantage, then works through a numerical example in which both countries gain from trade.

Absolute advantage

A country has an absolute advantage in a good if it can produce it using fewer resources (for example fewer hours of labor) than another country. It is the more productive producer of that good.

Opportunity cost

The opportunity cost of a good is what you give up to produce one more unit of it. In a two-good world, producing one more ton of grain means making less cloth.

Comparative advantage

A country has a comparative advantage in a good if its opportunity cost of producing it is lower than another country's. A country can have an absolute advantage in everything and still have a comparative advantage in only one good, because it cannot be better relatively at everything.

Key rule: each country should specialize in the good where its opportunity cost is lower, then trade.

A worked example

Two invented countries, Alpha and Beta, each have 120 labor hours per year and produce grain (tons) and cloth (units).

Hours per ton of grain Hours per unit of cloth
Alpha 2 4
Beta 6 8

Alpha is better at both goods, so it has an absolute advantage in both. Now compare opportunity costs.

  • Alpha: one unit of cloth costs 4 hours, which could have made 4 / 2 = 2 tons of grain. One ton of grain costs 2 / 4 = 0.5 cloth.
  • Beta: one unit of cloth costs 8 hours, which could have made 8 / 6 = 1.33 tons of grain. One ton of grain costs 6 / 8 = 0.75 cloth.

Alpha's opportunity cost of grain (0.5 cloth) is lower than Beta's (0.75 cloth), so Alpha has the comparative advantage in grain. Beta's opportunity cost of cloth (1.33 grain) is lower than Alpha's (2 grain), so Beta has the comparative advantage in cloth.

Python Opportunity costs from labor hours

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The gains from specialization and trade

Suppose that before trade each country uses its hours as follows (this is called autarky, no trade):

Grain Cloth
Alpha 50 tons (100 hours) 5 units (20 hours)
Beta 8 tons (48 hours) 9 units (72 hours)

Now each country specializes where it has the comparative advantage: Alpha makes only grain (120 / 2 = 60 tons) and Beta makes only cloth (120 / 8 = 15 units).

They trade at a price that lies between the two opportunity costs. For cloth, that range is 1.33 to 2 grain per unit. Say 1 unit of cloth = 1.6 tons of grain. Beta sends 6 units of cloth to Alpha, and Alpha sends 9.6 tons of grain to Beta.

After trade Grain Cloth Compare with autarky
Alpha 60 - 9.6 = 50.4 6 grain +0.4, cloth +1
Beta 9.6 15 - 6 = 9 grain +1.6, cloth same

Both countries can consume more than before. Neither could have done this without trade, because the consumption bundles lie outside each country's own production possibilities.

Python Check the gains from trade

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Why the terms of trade matter

Trade is beneficial for both only if the price lies strictly between the two opportunity costs. At a price of 2 grain per cloth, Alpha gains nothing, because that is exactly what cloth costs it at home. At 1.33, Beta gains nothing. Where in the range the price settles depends on bargaining power and world demand and supply, and decides how the gains are shared.

Sources of comparative advantage

  • Natural resources and climate: oil, minerals, farmland.
  • Factor endowments: countries with abundant labor tend to export labor-intensive goods; countries with abundant capital export capital-intensive goods.
  • Technology and skills: knowledge-based industries.
  • Economies of scale and learning: an industry that grows big can lower costs.
  • Institutions and infrastructure: reliable courts, ports and roads.

Comparative advantage can change over time. South Korea moved from simple manufactured goods to electronics and cars within decades, by investing in education and capital.

Limits of the simple model

The example assumes constant opportunity costs, no transport costs and full employment, and ignores who gains and loses inside each country. In reality, trade creates winners (consumers and export industries) and losers (workers in industries that face new competition). Gains from trade are large in total, but they are not evenly shared, which is why governments consider help for people who lose their jobs. The next lesson, tariffs and quotas, looks at government attempts to limit trade.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A country has comparative advantage in a good when

    Comparative advantage is about the lower opportunity cost, not about producing the largest amount.
  2. 2. Country X needs 3 hours to make a shirt or 6 hours to make a chair. What is the opportunity cost of one chair in shirts?

    6 hours of chair-making could have made 6 / 3 = 2 shirts.
  3. 3. Can a country with an absolute advantage in everything still gain from trade?

    Even then its opportunity costs differ across goods, so it gains by specializing in the good it is relatively best at.
  4. 4. Opportunity cost of cloth is 1.5 grain in country A and 2.5 grain in country B. Which price of cloth makes trade beneficial for both?

    The price must lie strictly between 1.5 and 2.5, so 2 grain per unit of cloth works.

Summary

  • Absolute advantage means lower resource cost; comparative advantage means lower opportunity cost.
  • Specializing by comparative advantage and trading at a price between the two opportunity costs makes both countries better off.
  • The terms of trade decide how the gains are shared.
  • Comparative advantage comes from resources, endowments, technology, scale and institutions, and it can change.
  • Trade creates both winners and losers within countries.

Next: Tariffs and Quotas