---
title: "Calculates compound interest growth over time using the formula A = P(1 + r/n)^(nt). Given a principal, annual rate, duration in years, and compounding frequency, returns the future value, total interest earned, effective annual rate (APY), and a year-by-year growth schedule. Supports optional recurring monthly contributions for savings projections. Works for savings accounts, CDs, investment returns, and retirement planning. Currency-agnostic."
method: POST
path: "/api/compound_interest"
tags: ["general"]
---

# Calculates compound interest growth over time using the formula A = P(1 + r/n)^(nt). Given a principal, annual rate, duration in years, and compounding frequency, returns the future value, total interest earned, effective annual rate (APY), and a year-by-year growth schedule. Supports optional recurring monthly contributions for savings projections. Works for savings accounts, CDs, investment returns, and retirement planning. Currency-agnostic.

`POST /api/compound_interest`

## Request

- Base URL: `https://calc.engineer`
- URL: `https://calc.engineer/api/compound_interest`
- Auth: none declared

## Request body

- object
  - `principal` number, required: Initial investment or deposit amount (any currency unit).
  - `annual_rate_pct` number, required: Annual interest rate as a percentage (e.g., 5.5 for 5.5%).
  - `years` number, required: Investment duration in years. Max 100.
  - `compounds_per_year` unknown, required
  - `monthly_contribution` number: Optional recurring monthly contribution added at each month. Defaults to 0.

## Response `200`

Computed result for compound_interest

- object
  - `result` object, required
    - `future_value` number, required: Final balance after all compounding and contributions.
    - `total_interest` number, required: Total interest earned over the full period.
    - `total_contributions` number, required: Total of all contributions (principal + recurring).
    - `effective_annual_rate_pct` number, required: Effective annual rate accounting for compounding frequency (APY).
    - `schedule` object[], required: Year-by-year growth schedule.
      - `year` number, required: Year number (1-based).
      - `start_balance` number, required: Balance at the start of the year.
      - `interest_earned` number, required: Interest earned during this year.
      - `contributions` number, required: Total contributions added during this year.
      - `end_balance` number, required: Balance at the end of the year.
  - `tool` string, required
  - `version` string, required
  - `computed_at` string, date-time, required
  - `chain` object, required
    - `feeds` unknown[]
      - unknown
    - `accepts_from` unknown[]
      - unknown

## Other responses

- `400`: Validation error or invalid JSON
- `404`: Tool not found

---

[API](https://skmtc.dev/calc/apis/calc-engineer-api.md) · [All operations](https://skmtc.dev/calc/apis/calc-engineer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calc/apis/calc-engineer-api/revisions/8830480ec488?raw)
