Compound interest calculator API with monthly contributions

$0.01 per call · failed calls are never charged · no account or API key needed

Future value of savings or an investment with compound interest: starting amount, annual rate, years, compounding (yearly, quarterly, monthly or daily) and an optional contribution at the end of each month. Returns the final balance, total contributed, interest earned and the balance after each year. Use for savings goals and investment what-ifs; rates are assumed constant.

When to use it

Run it free (25 free calls) Buy credits by card (from $5) Example result (JSON)

Try it with your own inputs

Starting amount (0 or more)
Annual interest rate in percent, -50 to 100
Years, up to 100

Uses one of your 25 free calls. Nothing is charged, and a call that fails is not counted.

Inputs

NameTypeDescription
principal (required)numberStarting amount (0 or more)
rate (required)numberAnnual interest rate in percent, -50 to 100
years (required)numberYears, up to 100
compoundstringyearly, quarterly, monthly (default) or daily
monthlynumberContribution at the end of each month (default 0)

Request

Over HTTP, with a card key from /credits:

curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/calc/compound-interest?principal=10000&rate=7&years=10"

Or one of your 25 free calls, no key:

curl "https://agent-data-tools.revmesh2074.workers.dev/calc/compound-interest?principal=10000&rate=7&years=10&trial=1"

Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum or Solana over x402; Base or Tempo over MPP) and retries.

Example result

{
  "futureValue": 54713.58,
  "totalContributions": 34000,
  "interestEarned": 20713.58,
  "byYear": [
    {
      "year": 1,
      "balance": 13201.42
    }
  ]
}

From an AI agent (MCP)

Add the MCP server to Claude, Cursor or any MCP client. This tool is calc_compound_interest, and the first 25 successful calls are free:

https://agent-data-tools.revmesh2074.workers.dev/mcp

Questions

Is the rate fixed?

Yes, the calculation assumes a constant annual rate.

What does it return?

The future value, total contributed, interest earned and the balance after each year.

How do I pay?

Each successful call costs $0.01; failed calls are not charged. The first 25 calls are free. Then pay with card credits (from $5) or per call in USDC over x402 or MPP. No account or API key is needed.

Related tools