A comparative advantage calculator shows which of two producers, people or countries should specialise in which of two goods. Enter the hours of labour each producer needs to make one unit of each good. The calculator works out each producer's opportunity cost, names who has the comparative advantage in each good and who has the absolute advantage, and shows the range of prices at which both sides gain from trading.
Comparative and absolute advantage
A producer has an absolute advantage in a good if it can make it with fewer resources than the other. It has a comparative advantage if it gives up less of the other good to make it, that is, if its opportunity cost is lower. Wikipedia's Comparative advantage article explains that gains from trade arise when each participant devotes resources to the activities where it has the lowest opportunity cost. A producer can have no absolute advantage in anything and still have a comparative advantage in something, which is why trade can benefit both sides.
The opportunity cost formula
Opportunity cost of good 1 = hours for good 1 ÷ hours for good 2
Opportunity cost of good 2 = hours for good 2 ÷ hours for good 1
The hours spent making one unit of good 1 could instead have made a fraction of a unit of good 2. Dividing the two labour requirements gives that fraction. Wikipedia states the rule in the same form: a country has a comparative advantage in good 1 if its ratio of labour needed for good 1 to labour needed for good 2 is lower than the other country's.
Ricardo's example
Wikipedia sets out David Ricardo's famous example. England needs 100 hours of labour to make a unit of cloth and 120 hours for a unit of wine. Portugal needs 90 hours for cloth and 80 for wine. Portugal can make both goods with less labour, so it has the absolute advantage in both. But England gives up only 100 ÷ 120 = 5/6 of a unit of wine for each unit of cloth, while Portugal gives up 90 ÷ 80 = 9/8. England's opportunity cost of cloth is lower, so England has the comparative advantage in cloth and Portugal in wine. Enter 100, 120, 90 and 80 to see this result.
The range of prices that suits both
Trade helps both producers if one unit of good 1 exchanges for an amount of good 2 that lies between their two opportunity costs. In Ricardo's case, the article gives the range as between 5/6 and 9/8 units of wine for each unit of cloth. At any price in that range, England gets more wine for its cloth than it could make itself, and Portugal gets cloth for less wine than it would cost to make at home. The calculator shows the lower and upper ends of the range.
How to use the comparative advantage calculator
- Name your producers and goods in your head: producer A and B, good 1 and 2.
- Enter the hours each producer needs for one unit of each good.
- Press Calculate to see who should specialise in which good.
If you have output per hour instead of hours per unit, convert first: 4 units an hour is 0.25 hours per unit.
Everyday examples
The idea is not only about countries. Two housemates sharing cooking and cleaning, two colleagues sharing a project or two firms deciding what to make can all use it. Suppose one person is faster at both tasks. They still gain by focusing on the task where they are relatively fastest and letting the other person take the rest, because the total done in the same time rises. Entering the hours each person takes for each task shows who should do what.
Gains from specialisation
In Ricardo's example, England spends 220 hours to make one unit of each good and Portugal 170. If each puts all its hours into the good it has the comparative advantage in, England makes 2.2 units of cloth and Portugal 2.125 units of wine, as Wikipedia notes. Together they now have more of both goods than the two units of each they made before, which is the gain from trade the theory predicts. For other ratio problems, try the ratio calculator.
Why trade still helps the more efficient side
It can seem odd that Portugal, which makes both goods with less labour, gains by buying cloth from England. The reason is that every hour Portugal spends on cloth is an hour it does not spend on wine, where its lead is largest. By moving those hours to wine and trading for cloth, Portugal ends up with more of both goods than if it made everything itself. The same logic explains why a skilled professional may hire help for tasks they could do faster themselves.
Common mistakes
- Confusing absolute with comparative advantage. Fewer hours means absolute advantage; lower opportunity cost means comparative advantage.
- Mixing hours per unit with units per hour. Enter hours per unit for every figure.
- Assuming one side always loses. Both gain when the trade price lies between the opportunity costs.
What next
Use this often? Add Comparative to your Home screen.
Frequently asked questions
How does a comparative advantage calculator work?
It divides each producer's hours for one good by its hours for the other to get opportunity costs, then gives each good to the producer with the lower opportunity cost.
Who has the comparative advantage in Ricardo's example?
England in cloth, with an opportunity cost of 5/6 wine, and Portugal in wine, even though Portugal has the absolute advantage in both.
What is the difference between comparative and absolute advantage?
Absolute advantage means using fewer resources; comparative advantage means a lower opportunity cost.
What price makes trade worth it?
Any price between the two producers' opportunity costs. In Ricardo's example, between 5/6 and 9/8 units of wine per unit of cloth.
Can a producer have a comparative advantage without an absolute advantage?
Yes. England has no absolute advantage in Ricardo's example but still has the comparative advantage in cloth.
Sources
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.