Economic surplus refers to the difference between the total benefits received from a good or service and the total costs incurred to produce or acquire that good or service. It is a measure of the net benefit to consumers and producers, and it illustrates how resources are allocated efficiently in an economy. In the context of comparative advantage and the Ricardian model, economic surplus becomes particularly important as it highlights the gains from trade when countries specialize in producing goods where they have a comparative advantage, ultimately leading to increased overall welfare.