Comparative advantage is the ability to produce a good at a lower opportunity cost than others can produce it. According to the law of comparative advantage, trading partners are both better off if they specialize in the production of goods for which they are the low-opportunity cost producer and trade for goods for which they are the high-opportunity cost producer.