Compound Interest Calculator
Calculate compound interest with contributions and see year-by-year growth.
Results
| Year | Starting Balance | Interest | Contributions | Ending Balance |
|---|
Use this tool from AI agents
This tool's engine is available to AI agents over MCP as compound_interest. Add the Clean.tools server, then your agent can call it directly.
claude mcp add --transport http clean-tools https://mcp.clean.tools/mcpclaude mcp add --transport http clean-tools https://mcp.clean.tools/mcp{"mcpServers":{"clean-tools":{"command":"npx","args":["-y","@clean-tools/mcp"]}}}{"mcpServers":{"clean-tools":{"command":"npx","args":["-y","@clean-tools/mcp"]}}}https://mcp.clean.tools/mcphttps://mcp.clean.tools/mcpOr call it over plain HTTP from any script. Same engine, JSON in and JSON out, no key:
curl -s https://api.clean.tools/v1/compound_interest \
-H 'content-type: application/json' \
-d '{"principal":10000,"annualRate":7,"years":30,"compoundingPerYear":12,"monthlyContribution":250}'curl -s https://api.clean.tools/v1/compound_interest \
-H 'content-type: application/json' \
-d '{"principal":10000,"annualRate":7,"years":30,"compoundingPerYear":12,"monthlyContribution":250}'const res = await fetch('https://api.clean.tools/v1/compound_interest', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ principal: 10000, annualRate: 7, years: 30, compoundingPerYear: 12, monthlyContribution: 250 })
});
const data = await res.json();const res = await fetch('https://api.clean.tools/v1/compound_interest', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ principal: 10000, annualRate: 7, years: 30, compoundingPerYear: 12, monthlyContribution: 250 })
});
const data = await res.json();How it works
This compound interest calculator shows how your money grows over time with compound interest and optional regular contributions. Enter your initial deposit, interest rate, time period, and compounding frequency to see detailed year-by-year projections.
All calculations run entirely in your browser using standard compound interest formulas. No data is sent to a server. No cost, no signup, no tracking.
Prefer to run the same projection from a script or an AI agent? The identical compound_interest engine is available through the Clean.tools compound-interest API, or as an MCP server you can add to your assistant by installing the @clean-tools/mcp package from npm.
Frequently asked questions
Are monthly contributions added before or after interest is applied?
Each month the contribution is deposited first, then interest is applied to the updated balance. This models a beginning-of-period (annuity due) deposit, so a given month's contribution earns interest that same month.
How does the compounding frequency interact with monthly contributions?
Contributions are always added on a monthly schedule, while interest compounds at the frequency you pick. For daily compounding the tool applies about 365 compounding steps per year (roughly 30 within each month, carrying the fractional remainder forward), so results are very close to a true day-by-day calculation but may differ slightly from other calculators depending on how they count days.
Why do the year-by-year rows only appear for full years?
The breakdown table adds a row after every 12 completed months, so a partial final year is not shown as its own row. If you enter 10 years you get exactly 10 rows; fractional years are not supported, and Years must be a whole number between 1 and 200.
Is my financial data saved or sent anywhere?
No. Every figure you type stays in your browser and is cleared when you reload or press Clear. Nothing is uploaded, stored, or tracked, so you can run projections on private numbers safely.
Can I use this from the command line or an AI agent?
Yes. The same engine is exposed as a REST endpoint at https://api.clean.tools/v1/compound_interest, so you can POST a JSON body from curl or any script and get JSON back. It is also an MCP server you can add to Claude, Claude Code, or Cursor, letting an agent run the projection directly. If you would rather run it locally, the @clean-tools/mcp npm package starts the same tool as a stdio server.
More tools from Clean.tools
Use Clean.tools from your AI agent
This tool is also compound_interest on the Clean.tools MCP server — the same engine, callable by your AI agent directly. No key, no signup: requests are processed in memory and request contents are never stored.
claude mcp add --scope user --transport http clean-tools https://mcp.clean.tools/mcpclaude mcp add --scope user --transport http clean-tools https://mcp.clean.tools/mcphttps://mcp.clean.tools/mcphttps://mcp.clean.tools/mcpEvery tool, the REST API, and setup for Cursor, Claude Desktop, VS Code & more →