Skip to content
Finance

Opportunity Cost Calculator

When you spend money instead of investing it, you give up the future growth that money could have earned. This calculator quantifies that trade-off: enter the amount you plan to spend, your expected investment return, how long you would have invested it, and the tax and inflation rates that apply to your situation. You get the after-tax, inflation-adjusted opportunity cost, the full gain breakdown, and a year-by-year growth chart so you can see exactly what you are forgoing.

Your details

The lump sum you are considering spending instead of investing.
The yearly percentage return you expect from the investment you would otherwise make. A broad stock-market index has historically averaged around 7-10% per year before inflation.
%
How long you would have kept the money invested.
years
The tax rate applied to your investment gains. In the US, long-term capital gains are typically taxed at 0%, 15%, or 20% depending on income. Set to 0 if you invest in a tax-advantaged account such as a Roth IRA.
%
The expected annual rate of inflation. This adjusts the result to show what your gains are worth in today's purchasing power. The US long-run average is around 3%.
%
Currency
Opportunity cost (inflation-adjusted)Significant opportunity cost
$1,913.42

After-tax gain in today's purchasing power, the real amount you forgo by spending instead of investing.

Opportunity cost (after-tax, nominal)$4,291.06
Total savings after tax$9,291.06
Gross investment gain (pre-tax)$5,048.31
Tax on gains$757.25
Gross gain (pre-tax)$5,048.31
Tax on gains$757.25
Net gain (after tax)$4,291.06
Real gain (inflation-adjusted)$1,913.42
$0.0$2k$4k0510
Year
Opportunity cost
YearNominal gain (after tax)Real gain (inflation-adjusted)
$0.0$0.0$0.0
$1.0$307$153
$2.0$637$313
$3.0$990$482
$4.0$1k$659
$5.0$2k$844
$6.0$2k$1k
$7.0$3k$1k
$8.0$3k$1k
$9.0$4k$2k
$10.0$4k$2k
  • Nominal gain (after tax)
  • Real gain (inflation-adjusted)

By spending $5,000 now you forgo $1,913 in real purchasing power over 10 years.

  • In real (inflation-adjusted) terms, investing $5,000 for 10 years at 7% would have grown your purchasing power by $1,913.
  • Inflation reduces your nominal after-tax gain of $4,291 by $2,378, highlighting the importance of beating inflation with your return.
  • Tax on gains costs $757. If you invest in a tax-advantaged account (Roth IRA, 401k), you keep that amount and your real opportunity cost rises accordingly.
  • Opportunity cost is the most powerful argument for investing early: the longer the time horizon, the larger the gap between spending and investing the same dollars.

Next stepTo reduce your opportunity cost, consider a tax-advantaged account, a higher-return asset class, or a longer time horizon. Even small increases in return rate compound dramatically over decades.

What is opportunity cost?

Opportunity cost is the value of the best alternative you give up when you make a choice. In personal finance, it is the return you forgo by spending money rather than investing it. If you spend $5,000 on a vacation and your alternative was to invest that money at 7% per year for 10 years, the opportunity cost is not just the $5,000 but the $9,836 you could have had after a decade of compound growth (before tax and inflation). The concept comes from economics, where it extends to time, labour, and any resource that has competing uses. Opportunity cost is invisible on a price tag, which is why people routinely underestimate it. A car, a holiday, a kitchen renovation or an impulse purchase all carry an opportunity cost that grows with both the amount spent and the length of time you would otherwise have stayed invested. This calculator makes that hidden cost visible.

How this calculator works

Enter the amount you are thinking of spending, the annual return you could realistically earn by investing it instead, how long you would keep that investment, your capital gains tax rate, and the expected rate of inflation. The calculator uses monthly compounding: your investment grows by (annual rate / 12) each month, which is more accurate than simple annual growth. The gross gain is the total interest earned over the period. Capital gains tax is applied to that gain at period end. The inflation adjustment then deflates the after-tax total back to today's purchasing power, giving you the real opportunity cost: what the forgone investment would actually be worth to you in present-day dollars. The year-by-year chart shows how both the nominal and real opportunity costs grow over time so you can see the compounding effect visually.

Tax-advantaged accounts and how they change the math

If you invest inside a Roth IRA, Roth 401(k), or similar tax-sheltered vehicle, qualified withdrawals are tax-free. Set the capital gains tax rate to 0% to model this scenario. The result will typically be substantially higher, because you keep the full gross gain rather than paying a percentage to the government. Traditional 401(k) and IRA contributions are pre-tax, so the comparison is more nuanced: you get a deduction now but pay ordinary income tax on withdrawal. For a rough estimate, use a tax rate equal to your expected marginal income tax rate in retirement.

Limitations and practical context

This calculator assumes a fixed annual return, which real investments do not deliver. Market returns fluctuate year to year, sometimes sharply. The model also assumes you invest the entire lump sum on day one rather than dollar-cost averaging, and that you reinvest all gains throughout the period. Inflation compounds too: the calculator applies the inflation rate as a steady annual deflator, which is a reasonable long-run approximation but not a precise forecast. Tax law changes, account contribution limits, and transaction costs are also excluded. Use the output as an order-of-magnitude guide to the true cost of spending versus investing, not as a precise financial forecast.

How return rate and time interact

Return rate5 years10 years20 years30 years
4%$935$2,040$5,052$9,513
6%$1,449$3,335$9,085$19,009
8%$1,988$4,827$14,693$35,440
10%$2,554$6,541$22,381$63,081
12%$3,148$8,508$32,843$109,020

After-tax gain on $5,000 at a 15% capital gains rate with 3% inflation, illustrating how return rate and time horizon compound the opportunity cost.

Frequently asked questions

What is opportunity cost in simple terms?

Opportunity cost is what you give up by choosing one option over another. When you spend money, you give up the growth that money could have earned if invested. When you invest, you give up the enjoyment of spending it now. This calculator focuses on the financial side: how much wealth you forgo when you choose to spend rather than invest.

Why does this calculator use monthly compounding?

Monthly compounding is the most common real-world convention for investment accounts and savings. It means interest is calculated and added to your balance 12 times per year rather than once. Over long periods, this produces meaningfully more growth than simple annual compounding. Using monthly compounding gives a more accurate picture of what an investment account would actually earn.

How do I choose a realistic annual return?

For broad stock-market index funds (S&P 500 type), long-run historical nominal returns have averaged around 10% per year and around 7% after inflation. For a balanced portfolio of stocks and bonds, something like 5-7% nominal is a common planning assumption. For cash savings accounts or short-duration bonds, use 3-5%. Always err toward the conservative side for planning purposes, since sequence-of-returns risk and fees can reduce the real outcome.

What capital gains tax rate should I use?

In the United States, long-term capital gains (on assets held more than one year) are taxed at 0%, 15%, or 20% depending on your taxable income. Most middle-income earners fall into the 15% bracket. If you plan to hold the investment in a Roth IRA or another tax-free account, enter 0%. If your investment would be taxed as ordinary income (short-term gains or certain account types), use your marginal income tax rate instead.

Why does inflation reduce the opportunity cost?

Inflation erodes purchasing power over time. A nominal gain of $10,000 in 20 years is worth less in real terms than it sounds today, because prices will be higher. When inflation is high relative to your investment return, the real opportunity cost can be surprisingly low, or even negative if your after-tax return fails to keep up with inflation. This is why beating inflation is a core goal of any investment strategy.

Can I use this for decisions other than financial investments?

The formula here applies specifically to money invested in a financial asset. For broader opportunity cost analysis involving time, labour, or business decisions, the concept is the same but the numbers are harder to quantify. Think of this calculator as a tool for one important subset of opportunity cost: the financial cost of spending versus investing a lump sum.

Sources

Written by Sarah Klein, CFP Certified Financial Planner · Chicago, USA

Fifteen years translating mortgage tables and amortization schedules into decisions that actually help real borrowers.

How we build & check our calculators

This tool provides general information and education, not professional advice. For decisions about your health or finances, consult a qualified professional.

Search 3,500+ calculators

Loading search…