What is opportunity cost?
Opportunity cost is the value of the next best alternative you give up when making a financial decision. Every dollar spent today could have been invested instead, earning compound returns over time. This calculator quantifies that trade-off by projecting how much your money would grow if invested, after taxes and inflation.
Whether you are deciding on a major purchase, evaluating a career change, or weighing lifestyle spending against long-term savings, understanding opportunity cost helps you make informed trade-offs. To model compound growth with flexible contribution schedules, use the compound interest calculator. For a full portfolio projection with recurring deposits and inflation adjustments, try the investment calculator. To compare gross profit margins on products you sell instead of spending, use the margin calculator.
How forgone investment earnings are calculated
The calculator compounds your forgone principal monthly at the annual return rate you provide, then applies capital gains tax and inflation adjustment:
After-tax earnings reduce the tax rate on gains, and the total nominal value (principal plus after-tax earnings) is deflated by monthly inflation:
Worked example
Suppose you spend $15,000 on a purchase instead of investing it at 3% annually for 2 years, with a 22% tax on gains and 1.5% annual inflation.
- Forgone earnings = $15,000 * [(1.0025)^24 - 1] = $926.36
- Tax on gains = $926.36 * 22% = $203.80
- Total after tax = $15,000 + $722.56 = $15,722.56
- Inflation-adjusted value = $15,257.60 in today's dollars
The real opportunity cost of spending that $15,000 is roughly $256 in lost purchasing power beyond the principal, or about $721 in after-tax investment earnings you forgo.
Frequently asked questions
Does opportunity cost include the principal?
What return rate should I use?
How is inflation handled?
Are results stored on a server?
Can I share my scenario?
Resources and references
The formulas and methods in this calculator were checked against these independent sources.