Quick answer
Opportunity cost = the return of the option you forgo − the return of the option you choose. Picking a $7,500 return over a $10,000 one costs $2,500 in forgone value, a ratio of 1.3333.
Enter the returns of the two options. The calculator returns the opportunity cost and the ratio.
Related tools: Marginal Cost Calculator: Extra cost of producing additional units. Price Elasticity of Demand Calculator: Price elasticity of demand by the midpoint (arc) method. GDP Calculator: Gross domestic product by the expenditure approach.
How to use the Opportunity Cost Calculator
- Enter return of the option you gave up (0 or more).
- Enter return of the option you chose (above 0).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Return of the option you gave up | A number | ≥ 0 |
| Return of the option you chose | A number | > 0 |
Formula and method
Formula
opportunity cost = forgone return − chosen return
IEEE-754 double precision; shown to the decimals indicated.
Positive means the other option would have done better.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Return of the option you gave up = 10000; Return of the option you chose = 7500.
| Result | Value |
|---|---|
| Opportunity cost | $2,500.00 |
| Ratio | 1.3333 |
Example 2
Inputs: Return of the option you gave up = 500; Return of the option you chose = 650.
| Result | Value |
|---|---|
| Opportunity cost | -$150.00 |
| Ratio | 0.7692 |
The first line is the headline result (opportunity cost). Below it the opportunity Cost Calculator lists ratio, which describe the same case from other angles. IEEE-754 double precision; shown to the decimals indicated.
What it represents
Every choice gives up the next-best alternative. Choosing the $7,500 option means giving up $10,000, so the cost is the $2,500 difference. A decision may still be right if the chosen option carries less risk or serves other goals.
Use consistent terms
Compare returns over the same period and in the same unit. Include non-money value where it matters, such as time or enjoyment, by assigning an estimate. The ratio 1.3333 shows the forgone option is 33% larger.
How the result changes with return of the option you gave up
Holding every other input at the first worked example, this table changes only return of the option you gave up. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Return of the option you gave up | Opportunity cost | Ratio |
|---|---|---|
| 5000 | -$2,500.00 | 0.6667 |
| 10000 | $2,500.00 | 1.3333 |
| 20000 | $12,500.00 | 2.6667 |
| 40000 | $32,500.00 | 5.3333 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Return of the option you gave up: entering "-1" shows "Return of the option you gave up must be at least 0." beside that field and no result.
- Return of the option you chose: entering "0" shows "Return of the option you chose must be greater than 0." beside that field and no result.
Choosing between the Opportunity Cost Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Marginal Cost Calculator](/business/marginal-cost/) | total cost before, total cost after and quantity before | Marginal cost |
| [Price Elasticity of Demand Calculator](/business/price-elasticity-demand/) | price before, price after and quantity before | Price Elasticity of Demand |
| [GDP Calculator](/business/gdp-calculator/) | consumption, investment and government spending | GDP |
| [Marginal Revenue Calculator](/business/marginal-revenue/) | total revenue before, total revenue after and quantity before | Marginal revenue |
| [Income Elasticity of Demand Calculator](/business/income-elasticity-demand/) | income before, income after and quantity before | Income Elasticity of Demand |
Background: business metrics
Business ratios depend on exactly which costs and revenues you include, so read each page's definition. Two common checks: break-even units = fixed costs ÷ (price − variable cost per unit), so $50,000 of fixed costs with a $10 price and $5 variable cost breaks even at 10,000 units; and net profit margin = net profit ÷ revenue, so $20,000 profit on $100,000 revenue is 20%.
Return on investment ignores time: 20% over five years is far less impressive than 20% in one, so compare returns over the same period.
Assumptions and limitations
- Use the same period and unit
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for return of the option you gave up and return of the option you chose to confirm this.
Frequently asked questions
Is opportunity cost always money?
No, it can be time or other benefits.
Can it be negative?
Yes, when the chosen option beats the alternative.
What is a simple example?
Spending an evening studying instead of working a paid shift.
What does the Opportunity Cost Calculator calculate?
Value given up by choosing one option over another. It returns Opportunity cost and Ratio.
What formula does the Opportunity Cost Calculator use?
opportunity cost = forgone return − chosen return. Positive means the other option would have done better.
What do I need to enter in the opportunity Cost Calculator?
You enter Return of the option you gave up and Return of the option you chose.
How is the result rounded or limited?
IEEE-754 double precision; shown to the decimals indicated. Use the same period and unit.
What is an example of a opportunity Cost result?
With return of the option you gave up 10000 and return of the option you chose 7500, the opportunity cost is $2,500.00.
Related calculators
- Marginal Cost Calculator — Extra cost of producing additional units.
- Price Elasticity of Demand Calculator — Price elasticity of demand by the midpoint (arc) method.
- GDP Calculator — Gross domestic product by the expenditure approach.
- Marginal Revenue Calculator — Extra revenue from selling additional units.
- Income Elasticity of Demand Calculator — Income elasticity of demand by the midpoint (arc) method.
- Price Elasticity of Supply Calculator — Price elasticity of supply by the midpoint (arc) method.
Sources
- OpenStax, Principles of Accounting, Volume 2: Managerial Accounting (Rice University)
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.