Skip to content
Tools.Town
290+ free online tools

Compound Interest Calculator API

Calculate the future value of any deposit with daily, monthly, quarterly, or annual compounding.

Category: Finance Endpoint: /v1/finance/compound-interest Method: GET Auth: API Key

Fast & Accurate

Get precise results instantly.

Easy Integration

Simple REST API with JSON response.

Developer Friendly

Clear docs and SDK examples.

Free to Start

1,000 free requests/month.

Endpoint

All requests should be made to the following endpoint:

GEThttps://api.tools.town/v1/finance/compound-interest

Authentication

This endpoint requires an API Key. Include your API key in the request header.

Authorization: Bearer YOUR_API_KEY
You can get your API key from your dashboard.

Request Parameters

Send a GET request with query parameters.

ParameterTypeRequiredDescriptionExample
principalnumberPrincipal must be greater than zero.500000
annualRatenumberRate cannot be negative.8.5
yearsnumberDuration must be greater than zero.5
frequencyenumThe frequency parameter.annually

Example Request

curl -G "https://api.tools.town/v1/finance/compound-interest" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "principal=500000" \
  --data-urlencode "annualRate=8.5" \
  --data-urlencode "years=5"

Example Response 200 OK

application/json
{
  "success": true,
  "data": {
    "amount": "0",
    "interest": "0",
    "principal": "0",
    "annualRate": "0",
    "years": "0",
    "frequency": "string",
    "n": "0",
    "effectiveRate": "0"
  }
}

Error Codes

CodeMeaning
400Bad Request — missing or invalid parameter
401Unauthorized — API key missing or invalid
429Rate limit exceeded — free tier: 1,000 requests/month
500Internal Server Error — try again or contact support