David Ricardo showed that trade benefits both sides even if one is better at producing everything (absolute advantage): each should specialise where its opportunity cost is lower.
How to use the Comparative Advantage Calculator
- Producer A (units of good X)
- Producer A (units of good Y)
- Producer B (units of good X)
- Producer B (units of good Y)
Results update as you type, and every field accepts the units shown in its menu.
How it works
Enter how many units of each good each producer can make with the same resources.
Inputs explained
| Field | What to enter |
|---|---|
| Producer A (units of good X) | A number |
| Producer A (units of good Y) | A number |
| Producer B (units of good X) | A number |
| Producer B (units of good Y) | A number |
What each result means
- A’s opportunity cost of 1 X (in Y) = [Producer A (units of good Y)]÷[Producer A (units of good X)]
- B’s opportunity cost of 1 X (in Y) = [Producer B (units of good Y)]÷[Producer B (units of good X)]
- A’s opportunity cost of 1 Y (in X) = [Producer A (units of good X)]÷[Producer A (units of good Y)]
- B’s opportunity cost of 1 Y (in X) = [Producer B (units of good X)]÷[Producer B (units of good Y)]
Formula
Opportunity cost of good X for producer A = A's output of Y ÷ A's output of X
Comparative advantage in X: the producer with the lower opportunity cost of X
Terms of trade benefit both when between the two opportunity costs
Worked example
Inputs: Producer A – units of good X: 40; Producer A – units of good Y: 20; Producer B – units of good X: 30; Producer B – units of good Y: 30.
Results: A's opportunity cost of 1 X (in Y) = 0.5; B's opportunity cost of 1 X (in Y) = 1; A's opportunity cost of 1 Y (in X) = 2; B's opportunity cost of 1 Y (in X) = 1; Comparative advantage in X = Producer A; Comparative advantage in Y = Producer B; Absolute advantage in X = Producer A.
Frequently asked questions
What is comparative advantage?
Producing a good at a lower opportunity cost than others.
How is it different from absolute advantage?
Absolute advantage means producing more with the same resources.
Can a producer have comparative advantage in both goods?
No. If it has it in one, the other has it in the second good.