In accounting and economics, an opportunity cost is the value of the next best alternative that must be given up or sacrificed in order to do or obtain something — when an economic choice is made, an alternative is always forgone. The concept is motivated by the idea of scarce resources.

For example, if we have a plot of arable land, we may choose to grow soybeans or carrots. The opportunity cost of growing carrots is the value of growing soybeans that we may give up.

We can visualise this with a production possibilities curve. By producing 30 computers, we give up the chance to produce 40 microwaves.