Who has the comparative advantage?
Type what two producers can make of two goods with the same resources, or the hours or workers each needs per unit. The comparative advantage calculator works out each opportunity cost and shows who has the comparative advantage and the absolute advantage in each good.
- Comparative advantage in good 1
- Saudi Arabia
Comparative advantage: Saudi Arabia in oil; United States in corn.
- Comparative advantage in good 2
- United States
- Absolute advantage in good 1
- Saudi Arabia
- Absolute advantage in good 2
- United States
- Comparative advantage
- Saudi Arabia in oil; United States in corn
- A: cost of 1 unit of good 1
- 0.25
- B: cost of 1 unit of good 1
- 2
- A: cost of 1 unit of good 2
- 4
- B: cost of 1 unit of good 2
- 0.5
Comparative advantage in good 1: Saudi Arabia. Comparative advantage: Saudi Arabia in oil; United States in corn.
The results are estimates for information only. They are not financial, tax, or legal advice. Check the numbers with your lender or a qualified professional before you decide. Terms of use
How to calculate
Finds which of two producers has the comparative and the absolute advantage in each of two goods, from output or input per unit, with each opportunity cost.
Example with the default inputs (Numbers are Output, Producer A Saudi Arabia, Producer B United States, Good 1 oil, Good 2 corn, A: good 1 100, A: good 2 25, B: good 1 50, B: good 2 100): Comparative advantage: Saudi Arabia in oil; United States in corn.
Method: Output mode: A’s cost of good 1 = A₂ ÷ A₁ (units of good 2), of good 2 = A₁ ÷ A₂; the same for B. Input mode: output = 1 ÷ input first. Comparative advantage: the lower cost. Absolute advantage: the higher output (fewer inputs).
- Each producer has the same resources (such as 100 worker hours), and costs per unit stay the same at any output.
- Two producers, two goods.
Worked examples
Each example is checked against the calculator on every build.
- Numbers are Output, Producer A Saudi Arabia, Producer B United States, Good 1 oil, Good 2 corn, A: good 1 100, A: good 2 25, B: good 1 50, B: good 2 100 gives Comparative advantage in good 1 Saudi Arabia, Comparative advantage in good 2 United States, Absolute advantage in good 1 Saudi Arabia, Absolute advantage in good 2 United States, A: cost of 1 unit of good 1 0.25, B: cost of 1 unit of good 1 2, A: cost of 1 unit of good 2 4, B: cost of 1 unit of good 2 0.5, Comparative advantage Saudi Arabia in oil; United States in corn.Source: https://openstax.org/books/principles-economics-3e/pages/33-1-absolute-and-comparative-advantage
- Numbers are Input per unit, Producer A United States, Producer B Mexico, Good 1 shoes, Good 2 refrigerators, A: good 1 4, A: good 2 1, B: good 1 5, B: good 2 4 gives Comparative advantage in good 1 Mexico, Comparative advantage in good 2 United States, Absolute advantage in good 1 United States, Absolute advantage in good 2 United States, A: cost of 1 unit of good 1 4, B: cost of 1 unit of good 1 1.25, A: cost of 1 unit of good 2 0.25, B: cost of 1 unit of good 2 0.8, Comparative advantage Mexico in shoes; United States in refrigerators.Source: https://openstax.org/books/principles-economics-3e/pages/33-2-what-happens-when-a-country-has-an-absolute-advantage-in-all-goods
- Numbers are Output, A: good 1 10, A: good 2 20, B: good 1 5, B: good 2 10 gives Comparative advantage in good 1 Neither (equal), Comparative advantage in good 2 Neither (equal), Absolute advantage in good 1 A, A: cost of 1 unit of good 1 2, B: cost of 1 unit of good 1 2.Source: https://openstax.org/books/principles-economics-3e/pages/33-1-absolute-and-comparative-advantage
How it works
Two producers (A and B) can each make two goods (1 and 2). Type four numbers, A₁, A₂, B₁ and B₂, in one of two ways:
- Output: how much of each good the producer could make with the same resources (such as 100 worker hours spent on that good alone).
- Input per unit: the resources (hours, workers) the producer needs per unit (or per 1,000 units) of each good. The page first turns each into output per unit of resource: output = 1 ÷ input.
Then, with the outputs:
- A's opportunity cost of good 1 = A₂ ÷ A₁, in units of good 2. A's cost of good 2 = A₁ ÷ A₂, in units of good 1. The same for B.
- Comparative advantage in a good: the producer with the lower opportunity cost of that good. Equal costs give "Neither (equal)".
- Absolute advantage in a good: the producer with the higher output of it (the fewer inputs per unit). Equal outputs give "Neither (equal)".
- The names are optional text; an empty name shows as A, B, good 1 or good 2.
Rules. Each number is at least 0.000001. Every comparison is made on exact fractions of the typed decimals, so equal costs are found exactly.
Rounding. The opportunity costs show to 6 significant figures.
Worked examples by hand
Oil and corn (page default, output). Saudi Arabia: 100 barrels or 25 bushels. United States: 50 barrels or 100 bushels. Saudi Arabia's cost of a barrel = 25 ÷ 100 = 0.25 bushel; the US's = 100 ÷ 50 = 2 bushels. Saudi Arabia's cost of a bushel = 100 ÷ 25 = 4 barrels; the US's = 50 ÷ 100 = 0.5 barrel. Comparative advantage: Saudi Arabia in oil; United States in corn. Absolute advantage: Saudi Arabia in oil (100 > 50), the US in corn (100 > 25).
Shoes and refrigerators (input per unit). Workers per 1,000 units: US 4 (shoes) and 1 (refrigerators); Mexico 5 and 4. Outputs per worker: US 1/4 and 1; Mexico 1/5 and 1/4. US cost of shoes = 1 ÷ (1/4) = 4 refrigerators; Mexico's = (1/4) ÷ (1/5) = 1.25. US cost of refrigerators = 0.25 shoes; Mexico's = 0.8. Comparative advantage: Mexico in shoes; United States in refrigerators. The US has the absolute advantage in both (it needs fewer workers for each).
Equal trade-offs. A: 10 and 20; B: 5 and 10. Costs of good 1: 20 ÷ 10 = 2 and 10 ÷ 5 = 2: Neither (equal) in both goods. A has the absolute advantage in good 1 (10 > 5).
Other questions people ask
How do I calculate comparative advantage?
Work out each producer’s opportunity cost of a good: how much of the other good it gives up to make one unit. With 100 worker hours, Saudi Arabia makes 100 barrels of oil or 25 bushels of corn, so a barrel costs 25 ÷ 100 = ¼ bushel. The US makes 50 barrels or 100 bushels, so a barrel costs 2 bushels. Saudi Arabia’s cost is lower: it has the comparative advantage in oil.
What is the difference between absolute and comparative advantage?
Absolute advantage means making more of a good with the same resources (or using fewer resources per unit). Comparative advantage means making it at a lower opportunity cost. A producer can have the absolute advantage in both goods but the comparative advantage in only one.
Can a country have a comparative advantage in both goods?
No. A producer’s opportunity cost of one good is the reciprocal of its cost of the other, so if its cost of good 1 is lower, its cost of good 2 must be higher. When the costs are equal, neither has a comparative advantage, and trade gives no gain.
What if my numbers are hours or workers per unit?
Choose “Input per unit”. The page turns each into output per unit of resource (1 ÷ input) first. In OpenStax’s example, the US needs 4 workers per 1,000 shoes and 1 per 1,000 refrigerators, so a pair of shoes costs it 4 refrigerators.
What are the terms of trade?
The price at which the goods are traded, in units of one good per unit of the other. Both producers gain when it lies between their two opportunity costs; with oil, between ¼ and 2 bushels of corn per barrel.
Why does comparative advantage matter?
David Ricardo argued in 1817 that if each producer specializes in the good with the lower opportunity cost and they trade, both can end up with more of both goods than they could make alone.