Macroeconomics

Comparative Advantage Calculator

Enter each producer's output of two goods to compare their opportunity costs.

  • Free
  • No sign-up

Outputs by producer

Enter the outputs to see the opportunity costs.

Worked example

With these example inputs:

  • Country A: good 1 output10
  • Country A: good 2 output20
  • Country B: good 1 output5
  • Country B: good 2 output30

A: opportunity cost of good 1: 2

  • A: opp. cost of good 12
  • B: opp. cost of good 16

Add this calculator to your site

Free to embed. Copy the snippet below, it drops the live calculator straight into any page.

Frequently asked questions

How is comparative advantage found?

Compare the opportunity cost of a good for each producer, measured in units of the other good given up. If A gives up 2 units of good 2 per good 1 and B gives up 6, A has the advantage in good 1.

What does the result tell me?

The producer with the lower opportunity cost for a good should specialise in it. Comparing the two figures shows who should make good 1 and who should make good 2.