math_compound_interest_calculator
Calculate the future value of a lump-sum investment with compound interest and recurring contributions. Get final balance, total interest, and per-period breakdown.
Instructions
Compound Interest Calculator. Project the future value of a lump-sum principal growing at a fixed annual rate with periodic (per-compounding-period) compounding and optional recurring contributions. Returns the final balance, total interest earned, total contributions, and a per-period or per-year breakdown. Use this for savings/investment growth ("how much will X grow to in N years"); use math_loan_calculator instead when you owe a balance and need a monthly payment + amortization schedule, or math_percentage_calculator for one-off percent-of / percent-change math. Pure local arithmetic: read-only, non-destructive, deterministic, contacts no external service, and is rate-limited.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | "compute" returns a per-year breakdown (one row per year); "schedule" returns the full per-period schedule (one row per compounding period). Both return the same final totals. | compute |
| principal | Yes | Starting lump-sum amount (P). 0 to 1,000,000,000,000. | |
| annualRatePercent | Yes | Nominal annual interest rate as a percent (e.g. 5 means 5%/yr). 0 to 100. | |
| years | Yes | Investment horizon in years (t). Greater than 0, up to 100; may be fractional. | |
| compoundingsPerYear | Yes | Compounding frequency per year (n): 1=annual, 2=semi-annual, 4=quarterly, 12=monthly, 365=daily. Must be exactly one of these values. | |
| monthlyContribution | No | Optional recurring monthly contribution. Converted to a per-compounding-period amount (monthlyContribution × 12 / compoundingsPerYear) so the same annual dollar flow applies at any frequency. 0 to 1,000,000,000. | |
| contributionTiming | No | Whether each contribution is applied at the start (annuity-due) or end (ordinary annuity) of the period. Only relevant when monthlyContribution > 0. | end |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | True when the calculation succeeded. | |
| operation | No | Echoes the operation that was run. | |
| result | No | Computed totals plus a breakdown (compute) or schedule (schedule) array. |