In microeconomic theory, the term "cost" must be understood as "opportunity cost". Whenever a person (or a firm or some other economic agent) undertakes an action she foregoes a number of alternative actions. A day at the races cannot also be a day in June or Ralph (as one's preferences and opportunities may allow). Money spent on a night at the opera cannot also be spent on lingerie. The best foregone alternative to any action a person takes, that is, the action the person would have undertaken if they had not done what they did, is the opportunity cost of that action.

It is difficult to directly measure the opportunity cost of an action taken by a person as one needs to know how much the individual valued a hypothetical action, the next best alternative to the action undertaken. While it is common in microeconomics textbooks to see the claim that the opportunity cost of a consumption good is what could be purchased for the same price, this is only true if the net benefit the consumer gains from consumption (called consumer surplus) of the two alternatives is the same. It is easier to evaluate the opportunity cost of a profit-maximising firm as this is the largest profit the firm forewent when it chose what it did.

For a brief but deep discussion of opportunity cost see James M. Buchanan, 1987, Opportunity cost, in The New Palgrave: A Dictionary of Economics, Ed by John Eatwell et al, Vol. 3, MacMillan ISBN 0-935859-10-1 (set) pp. 718-21. For a history of the concept of cost in economics see James M. Buchanan, 1967-68, Cost and Choice, Liberty Press, available on-line at http://www.econlib.org/library/Buchanan/buchCv6Contents.html.