---
title: "Use this when you need the exact interest rate that grows a principal to a target amount over a set number of years."
method: POST
path: "/v1/interest_rate"
tags: ["finance"]
---

# Use this when you need the exact interest rate that grows a principal to a target amount over a set number of years.

`POST /v1/interest_rate`

## Request

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

Use this when you need the exact interest rate that grows a principal to a target amount over a set number of years. type="compound" (default) uses the closed-form nth-root formula for the given compounding frequency; type="simple" uses linear growth. Requires target greater than principal and all values positive. Returns the annual rate as a percent plus the interest earned and the growth multiple; compoundingPerYear is null for simple interest. Deterministic: same input, same output. Example: principal=1000, target=2000, years=10, compoundingPerYear=12 -> ratePercent=6.9515, growthMultiple=2. Prefer this over trial-and-error.

## Request body

- object
  - `type` 'simple' | 'compound': Interest model (default compound).
  - `principal` number, required: Starting amount (positive).
  - `target` number, required: Ending amount (must exceed principal).
  - `years` number, required: Time horizon in years (positive).
  - `compoundingPerYear` integer: Compounding periods per year for compound mode (default 1).

## Response `200`

Structured tool result.

- object
  - `tool` string
  - `result` object
    - `type` 'simple' | 'compound', required: Interest model used.
    - `ratePercent` number, required: Solved annual interest rate as a percent, rounded to 4 decimals.
    - `compoundingPerYear` integer, nullable, required: Compounding periods per year for compound mode; null for simple interest.
    - `interestEarned` number, required: target minus principal, rounded to cents.
    - `growthMultiple` number, required: target divided by principal, rounded to 4 decimals.

## 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)
