Our writers and editors used an in-house natural language generation platform to assist with portions of this article, allowing them to focus on adding information that is uniquely helpful. The article was reviewed, fact-checked and edited by our editorial staff prior to publication.

Opportunity cost is the cost of what is given up when choosing one thing over another. In investing, the concept helps show the cost of an investment choice by showing the trade-offs for making that choice. Opportunity cost can be applied to any situation where you need to make a choice between two or more alternatives.

Here’s how opportunity cost works in investing, plus the differences between opportunity cost, risk and sunk costs.

Opportunity cost in investing

While the definition of opportunity cost remains the same in investing, the concept is a bit more nuanced because of potential differences among investments. The opportunity cost of investing in one stock over another can differ because investments have varying risks and rewards.

Opportunity cost is a bigger consideration in times of higher interest rates because you are forgoing the sure thing of keeping money in savings in order to pursue the possibility of higher return in another investment. When interest rates were at rock-bottom levels, there was little in the way of opportunity cost for investing rather than saving the money. — Greg McBride | Bankrate Chief Financial Analyst

For example, a stock with a potential 10 percent annual return has more risk than investing in a CD with a sure-fire 5 percent annual return. So the opportunity cost of taking the stock is the CD’s safe return, while the cost of the CD is the stock’s potentially higher return and greater risk. The stock’s risk and potential for loss may make the lower-yielding investment a more attractive prospect. If you don’t have the actual rate of return, you can weigh the investment’s expected return.

Investors might also want to consider the value of time in their calculation of opportunity cost. If one investment option requires more time than the other, consider what investment opportunities are available when each of those times has “ended.” For example, consider the expected interest rate environment one year from now if you purchase a 12-month CD. Would it be better or worse to invest in a longer-term CD? On one hand, you have a high interest rate for a longer period of time, but on the other,  your money is tied up that much longer and unavailable to you to invest in something else.

Opportunity cost is a consideration for businesses as well. For example, when a company evaluates new investments, it considers both the expected return on investment and the opportunity cost, including alternative investments, the cost of debt or any alternative use of the cash.

In short, any trade-off you make between decisions can be considered part of an investment’s opportunity cost.

How to calculate opportunity cost

To calculate opportunity cost, you can use the following formula:

Opportunity cost = Return on best forgone option

Take, for example, two similarly risky funds available for you to invest in. One has the potential to return 8 percent and the other 10 percent. The opportunity cost of the 10 percent return is forgoing the 8 percent return. Inversely, the opportunity cost of the 8 percent return is the 10 percent return. Even if you select the 10 percent return – and therefore earn a better overall return – your opportunity cost is still the next best alternative.

In the investing world, investors often use a hurdle rate to think about the opportunity cost of any given investment choice. If a potential investment doesn’t meet their hurdle rate, then investors won’t make the investment. So the hurdle rate acts as a gauge of their opportunity cost for making an investment.

Investors often use the average return on the S&P 500 index – about 10 percent annually – as a hurdle rate for whether they should invest in a security. The thinking goes: “If I can get 10 percent with no effort on the S&P 500, why spend time and have potentially more risk by investing in another security?” So for many investors, the opportunity cost of an investment is the return on the S&P 500, and that’s why investors are so focused on “beating the market,” since it’s their opportunity cost.

Opportunity cost examples

Here are two additional examples:

  • A new college graduate buys a car for $20,000 with a four-year loan, paying off the loan with $6,000 in payments each year, factoring in interest. At the end of ten years, the car is worth $3,000. If that money had been invested instead and earning 8 percent – below the S&P 500’s 10 percent average annual return – it would be worth $46,336 before taxes. The opportunity cost of owning the car is a lot more than just the sticker price.
  • You have a choice of two jobs: you could work as a barista for $15 an hour, or you could work for $17 an hour at a nearby retail store. Your opportunity cost for either job is the pay for the other job. However, you could complicate the calculation by adding in considerations such as the cost of transportation to get to either job or other factors such as overtime pay, benefits or any potential tips.

Opportunity cost vs. sunk cost

Opportunity cost is often overshadowed by what are known as sunk costs. A sunk cost is a cost you have paid already and cannot be recovered. Sunk costs should not be factored into decisions about the future or calculating any future opportunity costs.

For example, a college graduate has paid for college and now may have outstanding debt. This college tuition is a sunk cost, since it’s been incurred and cannot be recovered. If the graduate decides to change career fields, any decision should factor in future costs to do so rather than costs that have already been incurred. So the opportunity cost of changing fields may include more tuition and training time, but also the cost of the job this is left behind (as well as the potential salary of a job in the new field). The opportunity cost of a future decision does not include any sunk costs.

Despite this, many investors and other decision-makers engage in what’s called the sunk-cost fallacy. They decide to continue with a given course of action, regardless of other future costs, because they’ve already spent the money in the past. They may think, “I’ve already spent all this money [on an investment, a house, an education], that I have to continue with it.”

Sunk costs should be irrelevant for future decision making, while opportunity costs are crucial because they reflect missed opportunities. That’s not to say that your past decisions have no effect on your future decisions, of course. You’ll still have to pay off your student loans whether or not you continue in your chosen field or decide to go back to school for more education.

Opportunity cost vs. risk

Risk evaluates the actual performance of an investment against its projected performance. It focuses solely on one option and ignores the potential gains from other options that could have been selected. In contrast, opportunity cost focuses on the potential for lower returns from a chosen investment compared to a different investment that was not chosen. Opportunity cost can help investors see the full picture.

Bottom line

Opportunity cost is important to consider when making many types of decisions, from investing to everyday choices. Knowing how to calculate opportunity cost can help you accurately weigh the risks and rewards of each option and factor in the potential long-term costs of doing so.