Comparative advantage refers to the theory of international trade which explains why countries export certain goods and services to other countries, and why certain countries will benefit from free trade more than others. Put simply, the law of comparative advantage states that countries or regions will benefit from specializing in those goods in which production is the most efficient, i.e. those goods that are produced with the lowest opportunity cost. That is, countries or regions should focus on producing (or importing) the goods or services that require the smallest relative sacrifice, as measured by their opportunity cost, as opposed to allocating resources to the production of goods with higher opportunity costs.

The idea of comparative advantage has been used to justify the validity of international trade, and the concept of specialization in production. Comparative advantage, therefore, maintains that countries should specialize in the production of goods and services in which they can vastly improve the production rate per unit by redirecting resources towards comparative advantageous goods and services rather than spreading resources among all the goods and services. By specializing, countries can enjoy a higher level of productivity, while consuming the same overall amount of resources.

For instance, if Country A can produce an automobile twice as fast as Country B, under the law of comparative advantage, Country A will then focus on producing automobiles and Country B will focus on producing bicycles, which it can make faster than Country A. By doing so, both countries will have a better chance at providing a better quality of life to its citizens by trading the surplus of their respective goods with each other.

The theory of comparative advantage was first articulated by classical English economist David Ricardo in the early 1800s. However, the theory has since been amended by modern economists to take into account more complicated economic factors such as technological differences between countries and increased globalization. Comparative advantage has been used by economists in diverse fields from economic geography to migration studies, offering an important lens for understanding the global economic order.

Overall, comparative advantage is an important economic concept for understanding how countries or regions can grow their economies through international trade and cooperation. By shifting resources to industries where there is a lower opportunity cost, countries can often increase their overall economic productivity and, in turn, the overall quality of life of their citizens.