← Finance

APR Calculator

Convert between nominal rate, APR, and APY directly in your browser.

Rate Conversion

Loan APR

Use this tool from AI agents

This tool's engine is available to AI agents over MCP as apr_calc. Add the Clean.tools server, then your agent can call it directly.

Claude Code
claude mcp add --transport http clean-tools https://mcp.clean.tools/mcp
Claude Desktop (mcpServers)
{"mcpServers":{"clean-tools":{"command":"npx","args":["-y","@clean-tools/mcp"]}}}
Cursor
https://mcp.clean.tools/mcp

Or call it over plain HTTP from any script. Same engine, JSON in and JSON out, no key:

curl
curl -s https://api.clean.tools/v1/apr_calc \ -H 'content-type: application/json' \ -d '{"mode":"loan","loanAmount":250000,"monthlyPayment":1500,"termMonths":360,"fees":3000}'
JavaScript
const res = await fetch('https://api.clean.tools/v1/apr_calc', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ mode: 'loan', loanAmount: 250000, monthlyPayment: 1500, termMonths: 360, fees: 3000 }) }); const data = await res.json();

How it works

This APR calculator has two modes. The rate conversion mode converts a nominal (stated) interest rate to an effective annual rate (APY) based on compounding frequency. The loan APR mode calculates the true annual percentage rate of a loan by accounting for the loan amount, monthly payments, term, and any additional fees.

All calculations run entirely in your browser using standard financial formulas. No data is sent to a server. No cost, no signup, no tracking.

The same apr_calc engine is also reachable from scripts and AI agents through the Clean.tools API, or by installing the @clean-tools/mcp package from npm to run it as a local MCP server.

Frequently asked questions

What is the difference between APR and APY here?

APR is a simple annualized rate: in loan mode it is the monthly rate solved from your payments multiplied by twelve, with no intra-year compounding. APY (the rate conversion mode) is the effective annual rate that does account for compounding, so for the same nominal rate the APY is always slightly higher than the APR.

Why do the fees change the APR but not the total interest?

For the APR calculation, fees are treated as a Reg-Z style finance charge and discounted against the amount you actually receive (loan amount minus fees), which raises the APR. The "total paid" and "total interest" figures are based only on your scheduled payments and the loan amount, so they do not shift when you add fees.

Why does it say it cannot calculate an APR?

The loan solver uses Newton-Raphson iteration and needs a payment large enough to eventually repay the principal. If the monthly payment times the term is less than the loan amount, no positive rate exists and the tool reports that it could not converge. Check that the payment, term, and amount describe a real repayable loan.

Can I use this from the command line or an AI agent?

Yes. The same calculation is available as a REST endpoint at https://api.clean.tools/v1/apr_calc, 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 to let an agent call it directly. If you prefer to keep everything local, the @clean-tools/mcp npm package runs the same engine as a local stdio server.

How accurate are the results?

Rates are computed with double-precision floating point and shown to four decimal places, which matches typical lender disclosures. Actual lender APR can differ slightly because of daily-balance conventions, rounding rules, or which fees they include in the finance charge.

More tools from Clean.tools

View all tools

Use Clean.tools from your AI agent

This tool is also apr_calc 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 Code
claude mcp add --scope user --transport http clean-tools https://mcp.clean.tools/mcp
Any MCP client (streamable HTTP, authless)
https://mcp.clean.tools/mcp

Every tool, the REST API, and setup for Cursor, Claude Desktop, VS Code & more →