Free opportunity cost calculator
See what your spending really costs. Enter a one-time purchase or a recurring habit, the return you could have earned by investing instead, and a time horizon. The calculator returns the opportunity cost — the forgone investment growth — plus the total spent, what it would have grown to, and the multiple of your money — updated live, as you type.
On this page15 sections
Estimates only, based on a constant return and spend. Not financial advice.
Results are estimates. Consult a professional.
What is opportunity cost?
Opportunity cost is the value of the next-best thing you give up when you make a choice. Every dollar, hour, or resource can only be used once, so picking one option always means forgoing another. In money terms, the most useful version is the one this opportunity cost calculator measures: when you spend money instead of investing it, the opportunity cost is the growth that money would have earned if you had invested it instead. It is the invisible price tag on a purchase — what the same dollars could have become.
That makes opportunity cost different from the sticker price. A $5 coffee costs $5 today, but its opportunity cost is the future investment growth those $5 — repeated day after day — would have produced. This calculator separates the two: it shows the cash you actually spend, the amount that money would grow to if invested, and the gap between them. That gap is the opportunity cost.
The opportunity cost formula
The economics textbook states opportunity cost as the difference between two returns — what the option you skipped would have paid, minus what your chosen option pays:
For the everyday spend-vs-invest question, that idea becomes a future-value calculation. Your chosen option (spending) returns nothing, so the opportunity cost is simply the future value of the money if invested, minus the amount you spent:
How to calculate opportunity cost step by step
Whether you use the calculator above or a spreadsheet, the spend-vs-invest opportunity cost comes together in four steps:
- Set the amount. Enter the price of a one-time purchase, or the per-period cost of a recurring habit — for example $5 a day on coffee.
- Pick the forgone return. Choose the annual rate the money could have earned if invested instead. A long-run diversified stock-market average of about 7% (after inflation) is a common benchmark.
- Choose the time horizon. Decide how many years the money would have stayed invested. Opportunity cost grows dramatically with time because returns compound.
- Read the gap. The calculator compounds the money forward, totals what you actually spent, and shows the difference — the opportunity cost. It also reports the future value and how many times your money the spend could have become.
The opportunity cost calculator inputs explained
Amount — one-time or recurring
A one-time amount is a single purchase — a $1,500 phone or a $30,000 car. A recurring amount repeats at a frequency you choose (daily, weekly, monthly, or yearly), which is where small habits turn into large numbers. The calculator compounds a one-time spend as a lump sum and a recurring spend as a stream of contributions.
Annual return — the forgone alternative
This is the rate your money could have earned elsewhere — the heart of opportunity cost. Use a realistic figure for your alternative: roughly 4–5% for a high-yield savings account or bonds, about 7% for the long-run real return of a diversified stock portfolio, or 10% for the historical nominal average of the US stock market before inflation. A higher assumed return produces a larger opportunity cost.
Time horizon — years invested
How long the money would have stayed invested. Because growth compounds, the horizon is the single biggest lever on the result: the same daily spend has a modest opportunity cost over 5 years and an enormous one over 40. This is why opportunity cost is most powerful as a lifetime, not a one-off, idea.
A worked example using the opportunity cost calculator
Sam buys a $5 coffee every single day. Curious what the habit really costs, Sam uses the calculator to compare spending that money with investing it at a 7% annual return over a 30-year career. Here is how the calculator walks through it.
Step 1 — Enter the inputs
Sam sets the amount to $5, switches the mode to recurring at a daily frequency, sets the annual return to 7%, and the horizon to 30 years.
Step 2 — Total the spending and compound it forward
Over 30 years, $5 a day adds up to $54,750 of actual coffee spending (5 × 365 × 30). Treated instead as a daily $5 contribution earning 7% a year, that same stream grows to a future value of about $186,789.
Step 3 — Read the result
Note the precise wording. The coffee does not cost $186,789 — that is its future value if invested. What you give up by spending rather than investing is the growth: about $132,039. The next section shows how that gap widens year by year.
How a small daily spend grows into a large opportunity cost
Opportunity cost is not linear — it accelerates, because returns compound on prior returns. The table below follows the same $5-a-day habit at a 7% annual return, showing how the future value pulls away from the money actually spent as the years pass.
| Years | Total spent | Future value if invested | Opportunity cost |
|---|---|---|---|
| 5 | $9,125 | $10,924 | $1,799 |
| 10 | $18,250 | $26,426 | $8,176 |
| 15 | $27,375 | $48,424 | $21,049 |
| 20 | $36,500 | $79,639 | $43,139 |
| 25 | $45,625 | $123,934 | $78,309 |
| 30 | $54,750 | $186,789 | $132,039 |
$5/day at a 7% annual return. Figures computed by this calculator.
Opportunity cost in economics vs. everyday decisions
Opportunity cost is a cornerstone of economics, where it explains the difference between accounting profit and economic profit. Accounting profit is revenue minus the explicit, out-of-pocket costs you pay. Economic profit also subtracts implicit costs — the opportunity cost of resources you already own, such as the salary you forgo to run your own business, or the return your invested capital could have earned elsewhere.
- Explicit cost — an actual cash payment: wages, rent, materials.
- Implicit cost — the opportunity cost of a resource you own and use, with no cash changing hands.
- Accounting profit — total revenue minus explicit costs only.
- Economic profit — total revenue minus explicit and implicit (opportunity) costs.
For everyday choices the principle is identical but the unit changes — it can be money, time, or any scarce resource. Choosing a job two hours closer to home has an opportunity cost measured in salary; an afternoon spent on one project is an afternoon not spent on another. The two-option formula captures this directly: the opportunity cost of any choice is the return of the best alternative you turned down, minus the return of the option you picked. This calculator quantifies the money version, but the habit of asking "what am I giving up?" applies everywhere.
Opportunity cost and the latte factor
The most famous application of opportunity cost is the latte factor, a term coined by financial author David Bach. The idea: small, routine purchases — the daily coffee being the archetype — feel trivial in isolation but carry a large opportunity cost once you account for years of compounding. Cutting the habit and investing the money instead, Bach argued, can build a meaningful nest egg over a working lifetime.
The latte factor is not really about coffee. It is a lens for any recurring discretionary spend — subscriptions you forgot you have, daily lunches out, a habit you could downsize. Run each through the recurring mode of this calculator and you see the same pattern the worked example shows: a small number times a long horizon at a reasonable return becomes a surprisingly large opportunity cost.
Why opportunity cost matters for your decisions
Opportunity cost reframes spending as a trade-off rather than a sticker price, which sharpens almost every financial decision:
- Big purchases — weigh a car upgrade or a renovation against what the same cash could earn invested over the years you would have held it.
- Recurring habits — see whether a subscription or a daily indulgence is worth its lifetime opportunity cost.
- Paying off debt vs. investing — the opportunity cost of overpaying a low-rate loan is the higher return you could earn investing instead, and vice versa.
- Cash on the sidelines — money left in a no-interest account has an opportunity cost equal to the return it could earn elsewhere.
The goal is not to never spend — it is to spend deliberately. Pair this with the compound interest calculator to see the same growth from the saving side, the investment calculator to project a portfolio, or the Rule of 72 to estimate how fast the forgone money would double.
Assumptions, sources, and methodology
This calculator computes opportunity cost as future value if invested minus the amount spent. One-time amounts compound annually as a lump sum; recurring amounts compound at the chosen frequency as the future value of an ordinary annuity. It assumes a constant return and a constant spend, and excludes taxes and inflation — so treat the result as a planning estimate, not a guarantee. Real returns fluctuate, and a return entered as a nominal figure will overstate purchasing power against an inflation-adjusted one.
The definitions of explicit and implicit costs, accounting profit, and economic profit follow standard microeconomics (OpenStax, Principles of Economics). The latte-factor concept is attributed to David Bach, The Automatic Millionaire.
OpenStax — Principles of Economics: Explicit and Implicit Costs, and Accounting and Economic Profit.Frequently asked questions about the free opportunity cost calculator
About this opportunity cost calculator
This opportunity cost calculator runs entirely in your browser. Every figure you enter stays on your device — nothing is sent to a server, logged, or shared. It compounds a one-time spend as a lump sum and a recurring spend as an annuity, subtracts what you spent from what the money would have grown to, and shows the forgone growth instantly as you type.
Calculators Cloud offers 400+ free tools with no sign-up. The whole Finance calculators shelf includes Compound interest, Investment, and Rule of 72 tools alongside this one. Or browse the full calculator directory.