Which countries have the comparative advantage in Ricardo's example? I am a complete beginner here trying to learn through Khan Academy. I found some data that correspond to Ricardo's explanation of comparative advantage. According to Wikipedia "England has a comparative advantage in producing cloth due to lower opportunity cost." Yet, when I work through it I get the opposite, where am I going wrong?

          Cloth Wine
England     100 120
Portugal    90  80


England

100 = 120
100/100 = 120/100
1 = 1.2     

For 1 cloth there is an OC to England of 1.2 wine. For 1 wine there is an OC to England of 0.8333 cloth.

Portugal 

90 = 80
90/90 = 80/90
1 = 0.8888      

For 1 cloth there is an OC to Portugal of 0.8888 wine. For 1 wine there is an OC to Portugal of 1.125 cloth

England should produce wine because its OC is lower (0.8333 &lt; 1.125). 

Portugal should produce cloth because its OC is lower (0.8888 &lt; 1.2).
The mistake that you are doing is that you are treating the numbers in the table below that I assume you took from wikipedia as quantities that can be produced but they are not

          Cloth Wine
England     100 120
Portugal    90  80


Wikipedia states that in the problem they present these are "hours of work necessary to produce one unit" of given goods. So its not that England can produce $100$ cloth and $120$ wine. It takes $100h$ of labor to produce $1$ cloth and $120$ hour to produce $1$ unit of wine. Same for Portugal. This is the original table from wikipedia from which I assume you took the numbers:



So in this example if England had access to only $100$ hours of labor it would be able to produce exactly $1$ cloth and only $5/6$ units of wine.  Hence actually the opprotunity cost of $1$ cloth is $0.833$ wine and for $1$ wine the opportunity cost is $1.2$ cloth- the exact opposite in terms of OC.

The same holds for the Portugal - you will find exact opposite result namely in Portugal the opportunity cost of $1$ cloth is $0.888$ wine and opportunity cost of $1$ wine is $1.125$ cloth. 

Since the opportunity cost of producing cloth is lower in England it has comparative advantage in cloth production and since the opportunity cost of producing wine is lower in Portugal it has comparative advantage in wine making. Hence, also the final result will be opposite. 

Consequently, in this case wikipedia is correct in stating that "England has a comparative advantage in producing cloth due to lower opportunity cost" given the numbers they assume. So England should produce cloth after all. You have to read problem very carefully - dont just assume that you know what the table presents.