Guide
How to calculate opportunity cost
Opportunity cost is the value of the next-best thing you gave up. This guide shows the formula, the five steps to apply it to money, and worked examples for recurring expenses, one-off purchases and business decisions.
The opportunity cost formula
In its simplest form: opportunity cost = return of the option not chosen − return of the option chosen. For a purchase, the option not chosen is normally “keep the money invested”, and the return of the option chosen is zero in financial terms — so the opportunity cost is the full future value of the money.
For a recurring expense paid m times a year for t years at an assumed annual return r, the future value of the alternative is the ordinary annuity:
FV = PMT × [((1 + i)^n − 1) ÷ i], where i = (1 + r)^(1/m) − 1 and n = m × t.
Subtract the cash you actually paid (PMT × n) and you have the forgone growth — the part almost everyone leaves out.
Five steps
- Name both options. Opportunity cost is always a comparison. “Buy lunch out” versus “invest the difference” is a decision; “buy lunch out” alone is not.
- Set the horizon. Ten years and thirty years give wildly different answers. Pick the period you actually expect to keep the habit or hold the money.
- Convert the rate. A 7% annual return is not 7% ÷ 12 per month. Use
(1.07)^(1/12) − 1 ≈ 0.565%. Dividing overstates growth. - Compound forward. Grow the balance each period, then add the payment. The earliest payments compound longest, which is why the start date matters more than the amount.
- Adjust for inflation. Divide by
(1 + inflation)^tto get today’s purchasing power. It is the number worth planning around.
Worked example 1: a recurring expense
$200 a month of subscriptions, held for 20 years, with a 7% assumed annual return. Payments total $200 × 240 = $48,000. The monthly rate is about 0.565%, so the annuity grows to roughly $104,000. The opportunity cost of the subscriptions is about $56,000 in forgone growth — more than the cash itself. In today’s money at 2% inflation, the $104,000 is worth around $70,000.
Worked example 2: a one-off purchase
A $3,000 upgrade you did not need, left invested for 25 years at 7%, becomes 3,000 × 1.07^25 ≈ $16,300. The opportunity cost is the $13,300 of growth, not the $3,000 sticker price. Lump sums use FV = PV × (1 + r)^t — the future value calculator handles this case.
Worked example 3: a business decision
A business choosing between a $50,000 machine returning $8,000 a year and a marketing campaign returning $11,000 a year has an opportunity cost of $11,000 − $8,000 = $3,000 a year if it buys the machine. The same logic applies to time: an hour spent on low-value work costs the value of the highest-value work it displaced.
Common mistakes
- Counting the cash only. The spend is the smaller half of the number.
- Dividing the annual rate. Always convert with the exponent form.
- Including sunk costs. Money already spent is irrelevant to the choice in front of you.
- Using an unrealistic alternative. If you would not really have invested the money, the honest alternative might be a savings account rate — or paying down debt.
- Ignoring tax and fees. Real returns arrive after platform fees and tax; shading the assumed return down by 0.5–1% is a reasonable check.
Calculate it for your own decision
The calculator below applies exactly these steps: enter the amount, the frequency, the horizon and your assumptions, and it splits the cash spent from the forgone growth.
Opportunity cost after 20 years
$240,695
$311,188 in today’s money at 2.0% inflation
- Total spent
- $221,713
- If invested instead
- $462,409
- Foregone growth
- $240,695
- In today’s money
- $311,188
Assumes the recurring amount is invested at the end of each period. Expense amount is stepped up once per year by the annual increase rate.
| Year | Spent | If invested | Opportunity cost |
|---|---|---|---|
| 4 | $37,610 | $43,323 | $5,713 |
| 8 | $78,320 | $104,215 | $25,895 |
| 12 | $122,385 | $188,646 | $66,260 |
| 16 | $170,083 | $304,540 | $134,457 |
| 20 | $221,713 | $462,409 | $240,695 |
Frequently asked questions
What is the opportunity cost formula?
Opportunity cost = the value of the next-best alternative you gave up, minus the value of the option you chose. For money, that usually means the future value the cash would have reached if invested, rather than just the amount spent.
How do you calculate opportunity cost of a recurring expense?
Convert the expense to a per-period payment, convert your assumed annual return to the matching per-period rate using (1 + r)^(1/n) − 1, compound each payment forward to the end of your time horizon, then subtract the cash you spent. The remainder is the growth you forfeited.
What is an example of opportunity cost?
Spending $200 a month on subscriptions for 20 years costs $48,000 in cash. Invested at a 7% annual return the same payments would reach roughly $104,000, so the opportunity cost of the subscriptions is about $56,000 of forgone growth on top of the cash.
Is opportunity cost the same as sunk cost?
No. Opportunity cost looks forward at what you give up by choosing one option over another. A sunk cost is money already spent that cannot be recovered and should be excluded from the decision entirely.
Should opportunity cost be adjusted for inflation?
If you want the answer in today's purchasing power, yes. Divide the future value by (1 + inflation)^years. At 2% inflation, $100,000 in 20 years is worth about $67,000 today, which is the more honest figure for planning.
What discount rate or return should I use?
Use the return of the next-best option you would realistically take. A diversified stock portfolio is often modelled at about 7% a year before inflation; a savings account might be 3-4%; paying off debt is the interest rate you avoid. Lower assumptions give more conservative answers.