Skip to main content

Opportunity Cost Calculator

The purchase, your horizon, and what the money would have earned

$
yrs
%
%
%

Your result will appear here

Fill in the fields on the left and this updates as you type.

Calculation transparency

Know what this estimate is based on

Jurisdiction
General mathematical model
Scope and limitations
Planning estimate only. Enter complete, current figures and keep an appropriate buffer for irregular or unexpected expenses.
Source links checked
Jul 30, 2026

Built and regression-tested by Smart Tools Lab. It has not been individually reviewed by a licensed financial, tax, or legal professional.

How to use

  1. 01

    Enter what the purchase costs in "What the purchase costs" — the actual price you are about to pay, not a monthly payment.

  2. 02

    Set "Years you would have left the money invested" to your real horizon. This field does more work than any other on the page: the same money over thirty years is roughly four times what it is over ten.

  3. 03

    Check the two assumption fields. "Expected annual return" opens at 7% and "Inflation" at 2.5% — both are planning conventions rather than measurements, and both are yours to change.

  4. 04

    Open Advanced options if the thing has a resale value. Enter what you could still sell it for at the end of the horizon and the page subtracts it, because a car is not a coffee. The fund fee field lives here too.

  5. 05

    Read the headline, then the table under it: the same money at ten, twenty and thirty years, shown before tax, after the capital gains tax the invested version would eventually pay, and in today's money.

Formula

Net return = expected return − fund fee. Future value = purchase × (1 + net return)^years. Gain = future value − purchase. Capital gains tax = gain × your long-term rate. After-tax value = future value − tax. In today's money = after-tax value ÷ (1 + inflation)^years. What buying it costs you = after-tax value − whatever the thing would still be worth at the end.

Example

A $4,200 purchase, a twenty-year horizon, a 7% expected return, a 0.05% fund fee, 2.5% inflation and a 15% long-term capital gains rate. The money compounds at 6.95% after the fee, so $4,200 becomes $16,101. The gain is $11,901, the capital gains tax on it is $1,785, and the after-tax value is $14,316 — which, with nothing left to resell, is what buying it costs you: 3.41 times the price. In today's money that is $8,737. Stretch the horizon and the shape of the answer changes completely: the same $4,200 is worth $7,620 after tax at ten years, $14,316 at twenty and $27,427 at thirty. The fund fee alone accounts for $151 of the twenty-year figure, and at 6.95% the money doubles roughly every 10 years and 4 months — so twenty years contains about 1.9 doublings, which is 3.83× the price before tax and the 3.41× shown after it.

Definitions

Opportunity cost
The value of the best alternative you gave up. Here it is one specific alternative — investing the money and leaving it alone — priced after fees, after tax and, on the second line, after inflation.
Nominal versus real
Nominal is the number of dollars; real is what those dollars buy, expressed in today's prices. The gap between them over thirty years is large enough to change a decision.
Long-term capital gains rate
The rate on a gain from an asset held more than a year: 0%, 15% or 20% by taxable income, plus a 3.8% net investment income tax above thresholds that have never been indexed.
Expense ratio
The annual fee a fund charges as a share of the money invested, taken out of the return before it compounds. Around 0.03% for a broad index fund, nearer 0.6% for the average actively managed one.
Resale value
What the purchase would still fetch at the end of your horizon. Subtracted from the opportunity cost, because money you can get back was never really given up.

Good to know

The cost that never appears on the receipt

Every purchase has two prices. The first is on the tag. The second is whatever the same money would have become had you not spent it, and it is invisible, deferred, and usually far larger than the first. That second price is opportunity cost, and the reason it is worth calculating rather than merely believing is that human intuition about compounding is reliably wrong in one direction: we underestimate it, badly, and the longer the horizon the worse the error. Asked what $4,200 becomes in twenty years at 7%, most people guess somewhere between $8,000 and $10,000. The answer is $16,101. The gap between the intuition and the arithmetic is the entire reason this page exists. What makes the number tractable is that it needs only three inputs — an amount, a horizon and a rate — and only one of them is genuinely uncertain. The amount is on the receipt. The horizon is a choice you are making anyway. The rate is a guess, and the page makes you look at it rather than hiding it in a constant, because it is the only place the answer can go badly wrong.

Why the horizon beats the rate every time

The single most useful thing this page teaches is which lever matters. Compounding is exponential in the years and only linear-ish in the rate over any realistic range, so time is doing far more work than the return assumption. Take the same $4,200. At 7% before fees it is worth $8,224 after ten years, $16,101 after twenty and $31,526 after thirty: each additional decade roughly doubles the answer. Now hold the horizon at twenty years and move the rate instead — 5% gives $11,144 before tax, 9% gives $23,539. That is a real spread, but notice that arguing about the rate over a fixed twenty years moves the answer less than simply waiting another decade does. A cleaner way to hold it: at 6.95% money doubles about every 10 years and 4 months, so your horizon is really a count of doublings. Twenty years is about 1.9 of them, which is 3.83 times the price before tax and the 3.41 times the page reports after it. Nobody can control the rate. Everybody controls, at least a little, how early they start and how long they leave it alone.

Three corrections most versions of this calculator skip

The internet is full of opportunity-cost calculators that multiply a price by a growth factor and stop, and each of the three things they omit flatters the investment. The first is tax. The invested version is not free either: sell after more than a year and the gain is taxed at 0%, 15% or 20% by taxable income, with a further 3.8% net investment income tax above $200,000 of modified AGI single or $250,000 married filing jointly — two thresholds that have never been indexed, so they reach more households every year. On the page's example that is $1,785 off a $11,901 gain. Inside a 401(k), an IRA or an HSA none of it applies, which is a stronger argument for those accounts than any comparison of funds. The second is inflation: $14,316 in twenty years buys $8,737 worth of today's things, so the honest number is a little over half the dramatic one. The third is fees, which look like rounding errors and are not — 0.05% a year costs $151 on this one purchase over twenty years, because it comes out of the return before anything compounds. A tenth of a percent, held for thirty years, is a real amount of money.

What the number is for, and what it is not for

The honest limit of this page is that the cost it prices is conditional. It is a cost only if you would genuinely have invested the money and then left it alone for the whole horizon, through at least one frightening market, without touching it. Not spending is not the same as investing: money that merely stays in a checking account earns nothing and is usually gone inside two months. So the figure is the value of a decision you would still have to make and then keep, repeatedly, for decades. Two other qualifications. Everything you will ever buy has an opportunity cost, so the mere existence of a large number is not an argument against a purchase — if it were, it would be an argument against all of them equally. And for anything durable the figure overstates the loss, which is why the resale field exists: a car, a kitchen or a good tool hands part of its price back, while a holiday hands back none of it and is not thereby a worse purchase. Where the page genuinely earns its keep is in comparing two candidates against each other, in sizing one large discretionary decision, and in making the horizon visible before rather than after you commit.

Frequently asked questions

What is opportunity cost, in plain terms?

The value of the best thing you did not do with the money. Buying something is not only a payment; it is also a decision to decline whatever that money would otherwise have become. This page prices exactly one alternative — investing it and leaving it alone — because that is the one with arithmetic behind it.

Is the number on this page real money?

It is real arithmetic on an assumption. The compounding is exact; the return is a guess, and the whole answer hangs off it. On a $4,200 purchase over twenty years, 5% a year produces $11,144 before tax and 9% produces $23,539 — a $12,395 spread on a figure the page states to the dollar. Treat the headline as an order of magnitude, not a fact.

Why does the page subtract capital gains tax?

Because the invested version is not tax-free either, and comparing an after-tax purchase against a pre-tax investment quietly flatters the investment. Sell after more than a year and the gain is taxed at 0%, 15% or 20% depending on your taxable income, with a further 3.8% net investment income tax above $200,000 of modified AGI single or $250,000 married filing jointly. Inside a 401(k), an IRA or an HSA none of it applies.

Why is there both a nominal figure and a today's-money figure?

Because $14,316 in twenty years will not buy $14,316 worth of anything. At 2.5% inflation that after-tax pot is worth $8,737 in today's money — still more than three times the price of the purchase, but a much less dramatic number, and the honest one to decide on. Any calculator that quotes only the big figure is quoting a currency that will not exist by then.

What is the resale value field for?

For anything you could sell again. If a $4,200 purchase is still worth $1,500 at the end of your horizon, you are not out the whole invested pot — you are out the pot less what you still hold. Enter 0 for anything consumed: a holiday, a meal, a concert. That distinction is what separates a durable purchase from a disappearing one.

Does this mean I should never buy anything?

No, and a calculator that implied it would be useless. Every dollar you will ever spend has an opportunity cost, so a number existing is not an argument. What the page is genuinely good for is comparing two purchases against each other, or checking whether a large discretionary one is the size you thought it was. The figure is only a cost at all if you would truly have invested the money and left it alone for the whole horizon.

What if I would use the money to pay off debt instead?

Then the comparison is against a guaranteed rate rather than an assumed one, and clearing a balance usually wins outright — a 24% card is a risk-free, tax-free 24% that no market assumption matches. That is a different page: save versus pay off debt runs it properly.

Why does a 0.05% fund fee matter?

Because it is taken out of the return every year, before anything compounds. On this page's example it costs $151 over twenty years on a single $4,200 purchase. Broad index funds charge around 0.03%; the average actively managed fund charges roughly twenty times that, and the difference compounds against you for as long as the money is invested.