# Compound Interest Calculator

> Computes the future balance of a principal earning compound interest at a chosen compounding frequency, optionally with a fixed deposit at the end of every month, and splits the result into contributions and interest.

- Calculator id: `compound-interest` · Category: Finance (`finance`) · Tool name: `calculate_compound_interest`
- Canonical page: https://tttkmbb.com/finance/compound-interest · This document: https://tttkmbb.com/finance/compound-interest.md · JSON definition: https://tttkmbb.com/finance/compound-interest.json

## Purpose

Computes the future balance of a principal earning compound interest at a chosen compounding frequency, optionally with a fixed deposit at the end of every month, and splits the result into contributions and interest.

**Use when:** You need to project a savings account, certificate of deposit or investment balance from a starting amount, an annual rate, a term and optional monthly deposits.

**Do not use when:** Interest is not reinvested (use simple-interest), you need the deposit required to hit a target (use savings-goal), or you are repaying a loan (use loan-payment).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `principal` | number |  | required | Starting amount deposited or invested, in any currency. (min 0, max 1000000000000) |
| `annual_rate_percent` | number | % | required | Nominal annual rate (APR) in percent; 5 means 5 %. (min 0, max 100) |
| `years` | number | years | required | Length of the investment in years; fractional years allowed (2.5 = 30 months). (> 0, max 200) |
| `compounding_frequency` | enum: annually \| semiannually \| quarterly \| monthly \| weekly \| daily |  | optional, default "monthly" | How often interest is credited: n = 1, 2, 4, 12, 52 or 365 periods per year. |
| `monthly_contribution` | number |  | optional, default 0 | Optional fixed deposit made at the end of every month, compounded at the effective monthly rate implied by compounding_frequency. (min 0, max 1000000000) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `final_balance` | number |  | Principal, contributions and all compounded interest at the end of the term. |
| `total_contributions` | number |  | Principal plus all monthly deposits (money paid in). |
| `total_interest` | number |  | final_balance − total_contributions. |
| `effective_annual_rate_percent` | number | % | (1 + r/n)^n − 1: the yield actually earned per year at this compounding frequency. |
| `growth_multiple` | number |  | final_balance / total_contributions. |

## Formula

`A = principal × (1 + r/n)^(n·years) with r = annual_rate_percent/100 and n periods per year. Contributions: i_m = (1 + r/n)^(n/12) − 1, m = 12·years, FV_contrib = monthly_contribution × ((1 + i_m)^m − 1) / i_m (m × contribution when r = 0). final_balance = A + FV_contrib.`

Interest is credited n times per year at r/n per period. Monthly deposits are assumed at the end of each month and grow at the effective monthly rate of the chosen compounding, so principal and deposits follow one consistent growth curve; the deposit formula assumes 12·years is a whole number of months.

## Data Sources

- Investopedia – Compound Interest: Formula and Examples — https://www.investopedia.com/terms/c/compoundinterest.asp (reference, retrieved 2026-09-23)
- Wikipedia – Compound interest — https://en.wikipedia.org/wiki/Compound_interest (reference, retrieved 2026-09-23)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/compound-interest?principal=…&annual_rate_percent=…&years=…`
- `POST https://tttkmbb.com/api/v1/calculate/compound-interest` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/compound-interest · OpenAPI operationId `calculate_compound_interest` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool: `calculate_compound_interest` (dedicated) or `run_calculator` with `{"calculator_id": "compound-interest", "inputs": {…}}`

## Example

- 10,000 at 5 % compounded monthly for 10 years: inputs `{"principal":10000,"annual_rate_percent":5,"years":10,"compounding_frequency":"monthly"}` → `{"final_balance":16470.09,"total_contributions":10000,"total_interest":6470.09,"effective_annual_rate_percent":5.1162,"growth_multiple":1.647}`
- 5,000 plus 100/month at 6 % monthly for 20 years: inputs `{"principal":5000,"annual_rate_percent":6,"years":20,"compounding_frequency":"monthly","monthly_contribution":100}` → `{"final_balance":62755.11,"total_contributions":29000,"total_interest":33755.11}`

```
GET https://tttkmbb.com/api/v1/calculate/compound-interest?principal=10000&annual_rate_percent=5&years=10&compounding_frequency=monthly
```

## Limitations

Interest is not reinvested (use simple-interest), you need the deposit required to hit a target (use savings-goal), or you are repaying a loan (use loan-payment). Interest is credited n times per year at r/n per period. Monthly deposits are assumed at the end of each month and grow at the effective monthly rate of the chosen compounding, so principal and deposits follow one consistent growth curve; the deposit formula assumes 12·years is a whole number of months. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Does the compounding frequency matter much?**

Less than the rate and the time. 5 % compounded annually yields 5.00 %, monthly 5.116 %, daily 5.127 % per year; the effective_annual_rate_percent output shows the difference.

**Are contributions made at the start or the end of the month?**

At the end of each month (ordinary annuity). Start-of-month deposits would earn one extra month of interest, i.e. FV_contrib × (1 + i_m); use future-value with payment_timing=beginning for that.

**Is the rate an APR or an APY?**

annual_rate_percent is the nominal APR that is divided by the number of compounding periods. If you only know the APY, enter it with compounding_frequency=annually.

## Related

- [Savings Goal Calculator](https://tttkmbb.com/finance/savings-goal.md) — Solve for the monthly deposit needed to reach a target balance.
- [APY Calculator](https://tttkmbb.com/finance/apy.md) — Convert the nominal APR into the effective annual yield.
- [Simple Interest Calculator](https://tttkmbb.com/finance/simple-interest.md) — Interest without compounding, for comparison.
