---
title: "Use this when you need to project a principal's growth under compound interest, optionally with recurring monthly contributions, returning the final balance and a year-by-year breakdown rather than estimating compound growth yourself."
method: POST
path: "/v1/compound_interest"
tags: ["finance"]
---

# Use this when you need to project a principal's growth under compound interest, optionally with recurring monthly contributions, returning the final balance and a year-by-year breakdown rather than estimating compound growth yourself.

`POST /v1/compound_interest`

## Request

- Base URL: `https://api.clean.tools`
- URL: `https://api.clean.tools/v1/compound_interest`
- Auth: none declared

Use this when you need to project a principal's growth under compound interest, optionally with recurring monthly contributions, returning the final balance and a year-by-year breakdown rather than estimating compound growth yourself. Iterates month-by-month for accuracy; contributions are added at the start of each month; compoundingPerYear defaults to 12. annualRate is a percent; years is 1-200. Deterministic: same input, same output. Example: principal 10000, annualRate 7, years 10, monthlyContribution 500 -> finalBalance 107143.85, totalContributions 70000, totalInterest 37143.85, with a 10-row schedule (one per year).

## Request body

- object
  - `principal` number, required: Starting principal (>= 0).
  - `annualRate` number, required: Annual interest rate as a percent.
  - `years` integer, required: Number of years.
  - `compoundingPerYear` integer: Compounding periods per year (default 12).
  - `monthlyContribution` number: Amount added at the start of each month (default 0).

## Response `200`

Structured tool result.

- object
  - `tool` string
  - `result` object
    - `finalBalance` number, required: Ending balance after all years.
    - `totalContributions` number, required: Principal plus all monthly contributions.
    - `totalInterest` number, required: Interest earned = finalBalance - totalContributions.
    - `schedule` object[], required: One row per year.
      - `year` integer, required: 1-based year number.
      - `startingBalance` number, required: Balance at the start of the year.
      - `interest` number, required: Interest credited during the year.
      - `contributions` number, required: Contributions added during the year.
      - `endingBalance` number, required: Balance at year end.

## Other responses

- `400`: Invalid input or the tool reported an error.
- `413`: Request body exceeds the 128 KB limit.
- `429`: Rate limit exceeded; the response carries Retry-After and RateLimit-* headers — honor them and add jitter.

---

[API](https://skmtc.dev/clean/apis/clean-tools-api.md) · [All operations](https://skmtc.dev/clean/apis/clean-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/clean/apis/clean-tools-api/revisions/a24a01d2833c?raw)
