Sub topic 8
Gains from trade: a worked numerical example
This chapter works one example from start to finish. You will compare two producers before and after trade and check that both end up better off. It assumes you can already compute an opportunity cost from a table of output per day. It also assumes you know that comparative advantage means a lower opportunity cost, and that you can read a straight-line production possibilities frontier (PPF). Earlier chapters covered these ideas. Here they are used, not re-derived.
The setup
Two producers, X and Y, each have 10 working days. Each day, a producer can make wheat or cloth, and the output per day is fixed.
| Producer | Wheat per day | Cloth per day |
|---|---|---|
| X | 10 | 5 |
| Y | 4 | 4 |
Output per day is constant, so each producer's PPF is a straight line. An hour or day moved from one good to the other always yields the same amount, with no diminishing returns.
X is better at both goods. X has an absolute advantage in wheat (10 against 4) and in cloth (5 against 4). The question is whether Y has anything to offer X, and the answer depends on opportunity costs.
# Output per worker-day for two producers, X and Y.
output_per_day = {
"X": {"wheat": 10, "cloth": 5},
"Y": {"wheat": 4, "cloth": 4},
}
for name, o in output_per_day.items():
cost_of_wheat = o["cloth"] / o["wheat"] # cloth given up per unit of wheat
cost_of_cloth = o["wheat"] / o["cloth"] # wheat given up per unit of cloth
print(name, "1 wheat costs", cost_of_wheat, "cloth;", "1 cloth costs", cost_of_cloth, "wheat")
# Output:
# X 1 wheat costs 0.5 cloth; 1 cloth costs 2.0 wheat
# Y 1 wheat costs 1.0 cloth; 1 cloth costs 1.0 wheat| Producer | Opportunity cost of 1 wheat | Opportunity cost of 1 cloth |
|---|---|---|
| X | 0.5 cloth | 2.0 wheat |
| Y | 1.0 cloth | 1.0 wheat |
X gives up less cloth for each unit of wheat (0.5 against 1.0), so X has the comparative advantage in wheat. Y gives up less wheat for each unit of cloth (1.0 against 2.0), so Y has the comparative advantage in cloth. The two opportunity costs are reciprocals for each producer, so one producer cannot hold the advantage in both goods. The ratios differ between X and Y, and that difference is the source of the gains.
Step 1: the baseline without trade
Without trade, each producer must consume what it makes. We need a starting allocation of days to compare against. The allocation is a choice, and we fix it here so the arithmetic is concrete.
- X uses 6 days on wheat and 4 days on cloth.
- Y uses 5 days on wheat and 5 days on cloth.
That gives these outputs:
| Producer | Wheat | Cloth |
|---|---|---|
| X | 6 × 10 = 60 | 4 × 5 = 20 |
| Y | 5 × 4 = 20 | 5 × 4 = 20 |
| Total | 80 | 40 |
Each producer's bundle is a point on its own PPF, because every working day is used. X's PPF runs from 100 wheat (all 10 days on wheat) to 50 cloth (all 10 days on cloth). Y's PPF runs from 40 wheat to 40 cloth.
The result depends on the baseline you pick. A different split of days would give different "before" totals and a different size of gain. The method is the same for any baseline, and the logic of the result does not change. The next sections show why.
Step 2: specialise by comparative advantage
Now each producer puts all its days into the good where it has the comparative advantage.
- X makes only wheat: 10 days × 10 = 100 wheat.
- Y makes only cloth: 10 days × 4 = 40 cloth.
Compare the totals:
| Row | Wheat | Cloth |
|---|---|---|
| Before specialisation | 80 | 40 |
| After specialisation | 100 | 40 |
| Change | +20 | 0 |
Total cloth is unchanged and total wheat is 20 higher. The world produced more without using any extra labour. X moved its 4 cloth days to wheat and lost 20 cloth. Y moved its 5 wheat days to cloth and lost 20 wheat. But X gained 40 wheat, which is more than Y's 20-wheat loss. Y gained 20 cloth, which exactly offsets X's 20-cloth loss. The net effect is +20 wheat.
At this point nobody has benefited yet. X holds 100 wheat and no cloth. Y holds 40 cloth and no wheat. Each producer wants some of both goods, so trade is needed.
Step 3: find the range of acceptable prices
The terms of trade are the price at which the two goods exchange. Here we express the price of cloth in wheat. Each producer will only accept a deal that beats what it could do alone.
- Y can make cloth at a cost of 1.0 wheat per cloth. Y will not sell cloth for less than 1.0 wheat.
- X could make cloth itself at a cost of 2.0 wheat per cloth. X will not pay more than 2.0 wheat for cloth.
So any price between 1.0 and 2.0 wheat per cloth works for both sides. At a price outside the range, one side is better off making the good itself. The range is the gap between the two opportunity costs, and a wider gap means more room for gains.
We pick 1.5 wheat per cloth, the midpoint. Where the price falls inside the range decides how the gains are split. That is a matter of bargaining power, not of the model itself.
Step 4: trade and check the result
Suppose Y sells 20 cloth to X at 1.5 wheat per cloth. X pays 20 × 1.5 = 30 wheat.
days = 10
x = {"wheat": 10, "cloth": 5} # output per day
y = {"wheat": 4, "cloth": 4}
# Before trade: X uses 6 days on wheat and 4 on cloth; Y splits 5 and 5.
x_before = {"wheat": 6 * x["wheat"], "cloth": 4 * x["cloth"]} # 60 wheat, 20 cloth
y_before = {"wheat": 5 * y["wheat"], "cloth": 5 * y["cloth"]} # 20 wheat, 20 cloth
# Specialise: X makes only wheat, Y makes only cloth.
x_wheat = days * x["wheat"] # 100
y_cloth = days * y["cloth"] # 40
# Trade 20 cloth from Y to X at 1.5 wheat per cloth.
# That price lies between Y's cost (1.0 wheat) and X's cost (2.0 wheat).
price = 1.5
cloth_traded = 20
x_after = {"wheat": x_wheat - price * cloth_traded, "cloth": cloth_traded}
y_after = {"wheat": price * cloth_traded, "cloth": y_cloth - cloth_traded}
print("X before:", x_before, "after:", x_after)
print("Y before:", y_before, "after:", y_after)
# Output:
# X before: {'wheat': 60, 'cloth': 20} after: {'wheat': 70.0, 'cloth': 20}
# Y before: {'wheat': 20, 'cloth': 20} after: {'wheat': 30.0, 'cloth': 20}| Row | Wheat before | Wheat after | Cloth before | Cloth after |
|---|---|---|---|---|
| X | 60 | 70 | 20 | 20 |
| Y | 20 | 30 | 20 | 20 |
Each producer keeps the same cloth and gets 10 more wheat. Both are strictly better off, even though Y is worse than X at both goods. Total wheat rose from 80 to 100, and the 20 extra units split evenly at this price.
Why these bundles lie outside each PPF
Before trade, each producer was limited to its own PPF. We can test whether the new bundles would have been possible alone by counting the days needed.
- X's new bundle (70 wheat, 20 cloth) needs 70 ÷ 10 + 20 ÷ 5 = 7 + 4 = 11 days. X only has 10.
- Y's new bundle (30 wheat, 20 cloth) needs 30 ÷ 4 + 20 ÷ 4 = 7.5 + 5 = 12.5 days. Y only has 10.
Both bundles need more days than each producer owns, so neither producer could reach them alone. Trade lets each consume beyond its own PPF. The PPF limits what you can produce, and trade removes the requirement to consume only what you produce.
How the gains depend on the price
The total gain is 20 wheat whatever price in the range is used. The price only decides who receives it. Let p be the price of cloth in wheat, with 20 cloth traded.
- X's wheat after trade is 100 − 20p, so X's gain over the baseline 60 is 40 − 20p.
- Y's wheat after trade is 20p, so Y's gain over the baseline 20 is 20p − 20.
- The two gains add up to 20, whatever p is.
baseline_x_wheat = 60
baseline_y_wheat = 20
cloth_traded = 20
print("price gain_X gain_Y total")
for price in [1.0, 1.25, 1.5, 1.75, 2.0]:
gain_x = (100 - price * cloth_traded) - baseline_x_wheat
gain_y = (price * cloth_traded) - baseline_y_wheat
print(f"{price:5.2f} {gain_x:7.1f} {gain_y:7.1f} {gain_x + gain_y:6.1f}")
# Output:
# price gain_X gain_Y total
# 1.00 20.0 0.0 20.0
# 1.25 15.0 5.0 20.0
# 1.50 10.0 10.0 20.0
# 1.75 5.0 15.0 20.0
# 2.00 0.0 20.0 20.0At p = 1.0, Y gets nothing and X takes all the gain. At p = 2.0, the reverse holds. At either endpoint one side is indifferent, so a real deal needs a price strictly inside the range. The table also shows a point worth remembering: the terms of trade divide a fixed gain, and the fixed gain comes from specialisation.
What happens if the wrong party specialises
Reverse the assignment. X makes only cloth (10 × 5 = 50 cloth) and Y makes only wheat (10 × 4 = 40 wheat). Compare with the baseline, valuing cloth at 1.5 wheat so that bundles can be compared in one unit:
| Plan | Wheat | Cloth | Value in wheat at 1.5 per cloth |
|---|---|---|---|
| Baseline | 80 | 40 | 80 + 60 = 140 |
| Correct specialisation | 100 | 40 | 100 + 60 = 160 |
| Reversed specialisation | 40 | 50 | 40 + 75 = 115 |
The reversed plan produces less than the baseline. Wheat falls by 40 and cloth rises by only 10. At 1.5 wheat per cloth that is a loss of 25 wheat. No trade price can fix this, because the problem is in production. The world has used its days where the opportunity cost is higher. Comparative advantage decides who should specialise in what, and absolute advantage does not. X's edge over Y is larger in wheat (2.5 times) than in cloth (1.25 times), so X is relatively better at wheat.
Edge cases to check
- Equal opportunity costs. If Y could make 5 wheat and 5 cloth per day, both producers would have a cloth cost of 1.0 wheat per cloth. Wait: X's cost is 2.0, so the case is different. Take instead a Y with 5 wheat and 2.5 cloth, which has the same ratio as X. The acceptable price range collapses to a single point, so there are no gains from specialisation.
- Partial specialisation. Gains scale with how far each producer moves toward its comparative advantage. With constant costs, full specialisation yields the largest gain. With rising opportunity costs (a curved PPF), each producer stops short of full specialisation, as the extra units become more expensive.
- Trading less than 20 cloth. Smaller volumes give smaller gains at the same price. The gain per cloth is fixed by the price, so total gain is the price margin times the quantity.
- Trading more than Y's output. Y has only 40 cloth. Trade volume is capped by what the specialist produces and by what the buyer wants.
Summary of the method
- Compute each producer's opportunity cost for both goods.
- Assign each good to the producer with the lower opportunity cost.
- Have each producer spend all its time on its assigned good.
- Find the price range from the two opportunity costs of the traded good.
- Choose a price inside the range and compute each side's final bundle.
- Compare with the baseline and confirm that nobody is worse off and total output has risen.
Exercise
Producer A makes 6 units of grain or 3 units of oil per day. Producer B makes 2 units of grain or 2 units of oil per day. Who has the comparative advantage in oil, and what is the range of acceptable prices of oil in grain?
Show answer
A's opportunity cost of oil is 6 ÷ 3 = 2 grain. B's is 2 ÷ 2 = 1 grain. B gives up less, so B has the comparative advantage in oil (and A in grain). The price of oil must lie between 1 and 2 grain per oil. B will not sell for less than 1, and A will not pay more than 2.
Exercise
Using the chapter's example (X: 10 wheat or 5 cloth per day, Y: 4 wheat or 4 cloth per day, 10 days each), suppose X and Y trade 20 cloth at a price of 1.2 wheat per cloth. How much wheat does each hold after trade, and what is each side's gain over the baseline of 60 wheat for X and 20 wheat for Y?
Show answer
X pays 20 × 1.2 = 24 wheat, so X holds 100 − 24 = 76 wheat and 20 cloth. Y receives 24 wheat and keeps 20 cloth. X's gain is 76 − 60 = 16 wheat. Y's gain is 24 − 20 = 4 wheat. The gains total 20, the same as at any price in the range, but this price favours X.
Exercise
A student says: "X is better at everything, so X should make both goods and not trade with Y." Using the chapter's numbers, give a calculation that shows the claim is wrong.
Show answer
If X makes only wheat and trades 30 wheat for 20 cloth from Y (a price of 1.5 wheat per cloth), X ends with 70 wheat and 20 cloth. Working alone, X's best 10-day bundle with 20 cloth is 6 days on wheat (60 wheat) and 4 on cloth (20 cloth). So trade gives X 10 more wheat than it could produce alone while keeping the same cloth. Being better at both goods does not remove the gain, because what matters is the opportunity cost, and Y's cost of cloth (1.0 wheat) is lower than X's (2.0 wheat).