Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

Compound Interest Calculator API

Grow a starting amount with compound interest and optional end-of-month contributions; returns the final balance, interest earned, AER and an optional year-by-year table.

POST /api/v1/tools/compound-interest-calculatorMCP compound_interest_calculatorCalculators

See how savings grow with compound interest. Set the rate, compounding frequency and monthly contributions, then view a year-by-year breakdown.

Input

Send these as a JSON object. Unknown fields are rejected.

principal
Starting amount, in currency units. (number, 0 to …, required)
rate
Nominal annual interest rate in percent, e.g. 5 for 5%. (number, 0 to 100, required)
years
Whole years to grow, 1 to 100. (integer, 1 to 100, required)
frequency
How often interest compounds. (string, one of annually, semi-annually, quarterly, monthly, weekly, daily, default "monthly")
monthlyContribution
Amount added at the end of every month. (number, 0 to …, default 0)
breakdown
Include the year-by-year rows (paid in, interest, balance). (boolean, default false)
curl https://pithlab.com/api/v1/tools/compound-interest-calculator \n  -H "Authorization: Bearer $PITHLAB_KEY" \n  -H "Content-Type: application/json" \n  -d '{"principal":10000,"rate":5,"years":10,"frequency":"monthly","monthlyContribution":200}'
Example response
{
  "ok": true,
  "result": {
    "finalBalance": 47526.550866036356,
    "totalContributions": 34000,
    "totalInterest": 13526.550866036358,
    "effectiveAnnualRate": 5.116189788173298,
    "text": "Final balance 47,526.55 (paid in 34,000.00, interest 13,526.55)"
  }
}