Comparative Advantage Calculator
Opportunity costs for two producers, two goods, one clear answer.
Comparative advantage verdict
Estimates for planning only, not financial advice.
Comparative advantage decides who should make what: each producer specializes in the good with the lower opportunity cost, and both sides gain from trading. Enter what each producer can make of two goods with the same resources. With the defaults, the USA makes 100 wheat or 50 cloth (opportunity cost: 0.5 cloth per wheat) and the UK makes 60 of each (1 cloth per wheat). The USA holds the comparative advantage in wheat, the UK in cloth, and trade between 0.5 and 1 cloth per wheat benefits both.
How to Use This Calculator
Enter each producer\'s maximum output of each good using the same resources: the same workers, the same time, the same budget. Name the goods and producers for readable results. The calculator computes all four opportunity costs, names each side\'s comparative advantage, identifies any absolute advantages, and states the terms-of-trade range where both sides gain. Use it for trade questions, make-vs-buy choices, and team task allocation.
Enter each producer\'s output of each good with identical resources. These are the PPF endpoints.
Name the goods and producers so the verdict reads in plain language.
Read the opportunity costs and the verdict. The terms-of-trade range shows the prices where trade helps both sides.
The Opportunity Cost Math
Opportunity costs are reciprocals: if wheat costs 0.5 cloth, cloth costs 2 wheat, for the same producer. This symmetry guarantees the elegant result that each producer holds the comparative advantage in exactly one good (with two goods and no ties). Absolute advantage is simpler, just who makes more, and it can belong entirely to one side without changing the comparative verdict at all.
Worked Example
USA: 100 wheat or 50 cloth. UK: 60 wheat or 60 cloth. Opportunity costs of wheat: USA 50/100 = 0.5 cloth, UK 60/60 = 1 cloth. The USA\'s cost is lower, so the USA has the comparative advantage in wheat. Opportunity costs of cloth: USA 100/50 = 2 wheat, UK 60/60 = 1 wheat. The UK\'s cost is lower: comparative advantage in cloth. Absolute advantage: the USA makes more wheat (100 vs 60); cloth is tied at 50 vs 60 in the UK\'s favor. If the USA shifts 20 workers\' worth from cloth to wheat, it gains 40 wheat at a cost of 20 cloth; trading 30 of that wheat to the UK at 0.75 cloth each returns 22.5 cloth: both sides end with more than self-sufficiency allowed.
Reading the Verdict
| Result | Meaning | Action |
|---|---|---|
| Lower OC in Good 1 | Comparative advantage in Good 1 | Specialize there, trade for Good 2 |
| Higher output of a good | Absolute advantage only | Irrelevant to the trade decision |
| Equal opportunity costs | No comparative advantage | No gains from trade on cost grounds |
| Trade price inside the OC range | Mutually beneficial terms | Both sides consume beyond their PPF |
The model\'s limits are worth stating plainly: it assumes full employment, no transport costs, and no strategic value to domestic production, so it argues for efficiency, not for policy. Within a business, though, the logic is pure gold for delegation: assign each person the work where their opportunity cost is lowest, and the team\'s total output rises without anyone working harder. For related decision math, our build vs buy calculator applies the same thinking to make-vs-buy choices, and our contribution margin calculator ranks product-mix priorities.
Estimates for planning only, not financial advice.
Frequently Asked Questions
What is comparative advantage?
Comparative advantage is the ability to produce a good at a lower opportunity cost than someone else. The US making 100 wheat or 50 cloth faces an opportunity cost of 0.5 cloth per wheat; if the UK's cost is 1 cloth per wheat, the US has the comparative advantage in wheat even if the UK were better at making both goods. Trade lets each side specialize where its cost is lowest and both consume more.
What is the difference between absolute and comparative advantage?
Absolute advantage means producing more of a good with the same resources. Comparative advantage means producing it at a lower opportunity cost. A country can hold the absolute advantage in everything and still benefit from trade, because what matters is relative cost, not absolute productivity. This was Ricardo's 1817 insight, and it remains the intellectual foundation of free trade.
How do you calculate opportunity cost?
Divide what you give up by what you get: opportunity cost of wheat = cloth forgone / wheat gained. If 100 workers make either 100 wheat or 50 cloth, one wheat costs 0.5 cloth and one cloth costs 2 wheat. The two costs are reciprocals. The producer with the lower opportunity cost for a good holds the comparative advantage in it, and mathematically each side holds the advantage in exactly one good.
Why does comparative advantage matter for trade?
Because it proves trade benefits both sides even when one side is better at everything. Specialization by comparative advantage expands total output, and trading the surplus lets both consume beyond their own production possibility frontier. The gains come from cost differences, not from exploiting anyone: both sides get goods cheaper than making them domestically.
What are the terms of trade?
The exchange rate between the goods, which must fall between the two producers' opportunity costs for both to gain. If the US cost of wheat is 0.5 cloth and the UK's is 1 cloth, any trade price between 0.5 and 1 cloth per wheat benefits both. Where it lands inside that range decides how the gains split: closer to one side's cost favors the other side.
Does comparative advantage work with more than two goods?
Yes, the logic generalizes: rank goods by relative opportunity cost and each producer specializes in the goods where its disadvantage is smallest (or advantage largest). Real economies produce thousands of goods, and the pattern of trade follows these relative cost rankings statistically. The two-good model is a teaching simplification of a well-tested general principle.
What are the criticisms of comparative advantage?
The classic model assumes full employment, no transport costs, static technology, and no strategic concerns, none of which fully hold. It says nothing about distribution: trade can grow the pie while hurting specific workers and regions, which is the real political economy of trade debates. And it ignores national security: comparative advantage might say import all your semiconductors, strategy says otherwise.
How does this apply to personal career decisions?
Directly. You have a comparative advantage in the work where your opportunity cost is lowest relative to others, not the work you are "best" at absolutely. A founder who is a great coder and a mediocre salesperson should still sell if a hired engineer codes nearly as well: the founder's coding time costs the company its sales. Specialize where your relative edge is biggest; outsource the rest.
What is the production possibility frontier?
The PPF is the curve showing maximum combinations of two goods an economy can produce with fixed resources: the tradeoff made visible. Points inside are inefficient, points on the curve are efficient, points outside are unreachable alone. Trade pushes consumption beyond the PPF, which is the whole point: specialization plus exchange beats self-sufficiency.
Can comparative advantage change over time?
Constantly. Technology, education, wages, and exchange rates shift opportunity costs, moving advantages between countries and industries. Textiles migrated from Britain to America to Asia as costs shifted; semiconductors are migrating again today. Static analysis describes this year's pattern; dynamic advantage belongs to whoever invests in skills and technology.