Opportunity Cost Calculator: Formula & Worked Examples

Compare your choices

Free · No sign-up
Opportunity cost inputs

Enter net benefits for the same period. Mark the choice you plan to make.

Example inputs are ready. Enable JavaScript to calculate.

What are you giving up?

Your result and calculation steps will appear here.

Opportunity cost is the value of the best alternative you give up when you make a choice. Use the calculator above to compare net benefits, project two investment outcomes, or calculate the output sacrificed in a production trade-off. It shows the working so you can check what the number means.

Opportunity Cost Formula: What Are You Giving Up?

The core economic definition is simple: identify the single best feasible alternative you will not choose. The Federal Reserve Bank of St. Louis explains opportunity cost in terms of that next-best alternative, including uses of money and time. You do not add together every option you rejected. See its real-life explanation of opportunity cost.

Opportunity cost = value of the best alternative forgone

For a financial comparison, another useful calculation is the difference between outcomes:

Return difference = net value of the best forgone option − net value of the chosen option

These answer different questions. If your chosen project earns $1,200 and the best alternative earns $1,600, the alternative you give up is worth $1,600. The financial shortfall from choosing the first project is $400. Showing both avoids mistaking the difference for the full value forgone.

One choice, one best forgone alternativeIllustrative comparison: chosen project A earns 1200 dollars; project B earns 1600; project C earns 900. The best forgone value is 1600 dollars and the net value difference is 400 dollars. One decision. A clearer trade-off.Same weekend · Net earnings after extra costs · Illustrative values YOUR CHOICE Project A$1,200What you receive BEST FORGONE ALTERNATIVEProject B$1,600 OTHER ALTERNATIVEProject C$900 Value forgone$1,600 Financial difference$1,600 − $1,200 = $400

How to Calculate Opportunity Cost

  1. Define the constraint. What can you use only once: a sum of money, a weekend, a machine, or a fixed production budget?
  2. List feasible choices. Include options you can actually take. If you can do both projects, they may not be alternatives competing for the same resource.
  3. Use comparable values. Compare the same time period and consistent units. For monetary choices, use expected benefits minus the future costs that differ between options.
  4. Choose your mode. Use Compare choices for known net values, Investment growth for compounded balances, and Production trade-off for quantities from a table.
  5. Read the result in context. Check the best forgone value and the difference. Then consider risk, access to money, time, enjoyment, and other benefits the figures may omit.

In Compare choices, select My choice beside the option you plan to take. Add a third or fourth option only if it genuinely competes for the same resource. The calculator selects the highest-valued unchosen alternative; it does not sum them.

Opportunity Cost Examples With Worked Solutions

All figures below are hypothetical teaching examples. They are not market forecasts, average earnings, or recommended investments.

Example 1: Two Projects Competing for the Same Weekend

You can complete one of three projects over the same weekend. After the extra costs of doing each job, their expected net earnings are:

ChoiceExpected net earningsDecision
Project A$1,200Chosen
Project B$1,600Best alternative
Project C$900Other alternative

Choosing A gives up B, the best available alternative. The opportunity cost is $1,600. The return difference is $1,600 − $1,200 = $400. Adding B and C to obtain $2,500 would be incorrect because you could not do both instead of A within the same weekend.

A may still fit you better if it has a more reliable payer, a shorter commute, or work you value more. The calculation exposes the trade-off; it does not measure those preferences automatically.

Example 2: Compare Two Investment Returns

Suppose the same $10,000 is available for either option over 10 years. Assume a constant effective annual return of 5% for the chosen option and 7% for the alternative, after fees. There are no additional deposits, taxes, or withdrawals in this example.

Future value = starting amount × (1 + annual return)years

CalculationProjected result
Chosen: $10,000 × 1.0510$16,288.95
Alternative: $10,000 × 1.0710$19,671.51
Alternative minus chosen$3,382.57

The full alternative balance forgone is $19,671.51; the projected extra value forgone is $3,382.57. The difference is calculated from unrounded balances, so subtracting the displayed rounded figures can differ by one cent.

The SEC’s Investor.gov explains compound interest as earning interest on earlier interest. In this tool, annual rates are converted to effective monthly rates so optional additions can be applied at each month-end. Without additions, the result matches the annual formula above.

Enter comparable returns after the fees you want to model. If you are checking how costs affect an investment, our guide to expense ratios explains what a fund’s annual operating-cost percentage does and does not include. A higher assumed return can involve different risk; the calculator does not adjust for that risk.

The return gap compounds over timeIllustrative constant returns on 10000 dollars over 10 years, with no additions or taxes. At 5 percent the balance is 16288.95 dollars; at 7 percent it is 19671.51 dollars. The unrounded difference rounds to 3382.57 dollars. Small rate differences can add up.$10,000 · 10 years · No additional deposits or taxes · Illustrative returns Year 0Year 10 $10,000 CHOSEN · 5%$16,288.95 ALTERNATIVE · 7%$19,671.51 EXTRA VALUE FORGONE$3,382.57Calculated before rounding A comparison of assumptions — not a prediction of future investment returns.

How to Calculate Opportunity Cost From a Table

For a production question, measure the output lost relative to the extra output gained. Keep the available resources and technology unchanged when interpreting the movement as a trade-off along a production possibilities frontier (PPF).

Opportunity cost per extra unit of X = units of Y forgone ÷ additional units of X gained

Example 3: More Laptops, Fewer Bicycles

Production combinationLaptopsBicycles
B1096
C2088
D3074

Moving from C to D gains 30 − 20 = 10 laptops and sacrifices 88 − 74 = 14 bicycles. Divide the sacrifice by the gain: 14 ÷ 10 = 1.4 bicycles per additional laptop. The total sacrifice is 14 bicycles; the cost of each extra laptop is 1.4 bicycles.

For comparison, moving from B to C sacrifices eight bicycles for 10 laptops, or 0.8 bicycles per laptop. The rise from 0.8 to 1.4 illustrates increasing opportunity cost. One interval alone cannot establish that costs are increasing.

This ratio follows the production trade-off approach described in OpenStax’s explanation of the PPF. A point-to-point ratio is an average opportunity cost over that interval, rather than an exact slope at every point on a curved frontier.

Production trade-off: 1.4 bicycles per extra laptopMoving from 20 laptops and 88 bicycles to 30 laptops and 74 bicycles gains 10 laptops and forgoes 14 bicycles. Opportunity cost over this interval is 14 divided by 10, or 1.4 bicycles per additional laptop. Illustrative data with fixed resources. More of one good. Less of another.A production trade-off using fixed resources · Illustrative data BicyclesLaptops C: 20, 88 D: 30, 74 040 ADDITIONAL LAPTOPS30 − 20 = 10 BICYCLES FORGONE88 − 74 = 14 COST PER EXTRA LAPTOP14 ÷ 10 = 1.4bicycles per laptop Keep the units: total output forgone and cost per extra unit are different results.

How to Read the Calculator’s Results

ResultMeaning
Best forgone alternativeThe highest net value among the choices you did not select.
Alternative is ahead byHow much greater the best unchosen value is than your chosen value.
Your choice is ahead byYour chosen value exceeds the best unchosen value. An opportunity cost still exists because an alternative is forgone.
Full alternative value forgoneThe projected alternative investment balance, including its deposits and growth.
Cost per extra unitThe quantity of one good sacrificed for each additional unit of the other good.

An investment result is a scenario, not a prediction. Both options use the same starting amount, monthly additions, and horizon. The chart and annual table show nominal balances. If you enter inflation, the result also shows final balances in today’s money: future value ÷ (1 + inflation rate)years. It does not calculate federal or state taxes, uncertain returns, or the probability of reaching a target.

Common Mistakes When Calculating Opportunity Cost

  • Comparing revenue with profit. Subtract the future costs that differ between choices before entering net values. Do not subtract the same expense twice.
  • Mixing periods or units. Monthly earnings and annual earnings are not directly comparable. A physical production ratio must state which good is forgone and which is gained.
  • Adding all rejected alternatives. Use the best feasible alternative, not their combined total.
  • Including unrecoverable sunk costs. Money already spent that cannot change is not recovered by choosing a different future option. Compare the future consequences from today onward.
  • Assuming higher projected returns mean a better decision. Reliability, liquidity, taxes, personal priorities, and risk can change which option suits you.
  • Treating every expense as avoidable. A committed payment may continue under either choice. Our guides to fixed expenses and variable expenses can help separate commitments from amounts that change.

For a business order, also check marginal cost versus marginal revenue. An order can cover its extra cash costs and still displace a more profitable use of scarce capacity. Physical output sacrificed, extra cash costs, and net profit differences are related measures with different units.

Opportunity Cost Calculator FAQs

What is the formula for opportunity cost?

In economic terms, it is the value of the best feasible alternative forgone. For a financial comparison, subtracting the chosen net value from the best forgone net value gives the return difference. For production, divide output forgone by additional output gained.

Can opportunity cost be zero?

Yes, a measured forgone value can be zero. A zero difference between two positive-valued options only means their measured values are equal; it does not mean the alternative has no value. A production trade-off can also have a zero measured sacrifice over a particular interval.

What does a negative return difference mean?

It means the chosen option has a higher measured net value than the best unchosen option. The tool labels this as an advantage of your choice. It does not mean you receive a cash payment for the opportunity cost or that every nonfinancial consideration favors that choice.

Is opportunity cost the same as money spent?

No. The cash price tells you what you pay. Opportunity cost asks what alternative use of that money or another limited resource you give up. To avoid double counting, be clear whether you are comparing total outcomes, net benefits, or only incremental earnings.

How do I calculate the opportunity cost of time?

Identify the best realistic use of the same hours. If four hours could earn $25 per hour after relevant costs, the measurable earnings forgone are $100. Time spent resting, caring for someone, or studying can have value that an hourly earnings estimate does not capture.

Does the calculator include taxes or investment risk?

Investment mode uses constant user-entered returns after fees and excludes taxes and volatility. If comparing known after-tax net benefits, use Compare choices and enter consistently calculated figures. The tool cannot decide which investment is suitable for you.

Are my inputs saved?

The calculator itself runs in your browser without an account and does not send your amounts to a calculation service or save them in browser storage. Copy and CSV export are optional. Site analytics, browser extensions, and other services may have their own practices.

Methodology: best-alternative comparisons, effective monthly compounding, and interval production ratios. Examples independently calculated for this page. Read our Editorial Policy for how we approach sources and corrections. Educational estimates; not personalized financial advice.

Welcome Back!

Login to your account below

Retrieve your password

Please enter your username or email address to reset your password.