Opportunity Cost Calculator
calculate_opportunity_costCalculation, not advice. Verify with a professional before acting. Calculate the true cost of recurring spending by showing what that money would be worth if invested. Pick this when the input is recurring spending. Pick calculate_compound_interest when the input is a balance and its contributions with no spending to price, and compare_payoff_vs_invest when the alternative to investing is paying down debt. The response includes chart_hints with rendering directives any client can use.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | What the spending is, e.g. 'coffee' or 'streaming subscriptions'. Optional. Max 120 characters. | |
| years | Yes | Time horizon in years. Integer, greater than 0. REQUIRED, no default. | |
| chart_title | No | Override for the chart title. Must not contain em-dashes or en-dashes. Max 120 characters. Optional. | |
| tax_bracket_pct | No | Tax bracket as a percentage, applied as a flat haircut to the investment gain. Decimal from 0 to 100. Optional. | |
| monthly_spending | Yes | Monthly spending to price against investing. Decimal, at least $0.01. The opportunity cost of spending $0 is degenerate and is rejected. REQUIRED, no default. | |
| annual_return_pct | Yes | Effective annual investment return, e.g. 8 not 0.08; the monthly compounding step is (1+pct/100)^(1/12)-1. Decimal from 0 to 100. REQUIRED, no default. |