HomeGuides › Loan & Mortgage Calculator API

Loan & Mortgage Calculator API

Building a loan or mortgage calculator means re-deriving the amortization formula and getting every rounding edge right. One GET request does it for you.

The API returns the monthly payment, total interest, and a full amortization schedule — and the same listing also covers compound interest, ROI, VAT, tip, and break-even math.

Calculate a monthly loan payment

curl
curl -G "https://finance-math.p.rapidapi.com/loan" \
  -d "principal=250000" -d "annualRate=3.5" -d "termMonths=360" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "X-RapidAPI-Host: finance-math.p.rapidapi.com"
JavaScript (fetch)
const qs = new URLSearchParams({ principal: "250000", annualRate: "3.5", termMonths: "360" });
const res = await fetch(
  "https://finance-math.p.rapidapi.com/loan?" + qs,
  { headers: {
      "X-RapidAPI-Key": "YOUR_KEY",
      "X-RapidAPI-Host": "finance-math.p.rapidapi.com",
  } }
);
const { monthlyPayment, totalInterest } = await res.json();

Get the full amortization schedule

Each row gives the month, the payment, the principal/interest split, and the remaining balance. termMonths is capped at 1200 (100 years) and principal must be positive, so bad input returns a clean 400 instead of nonsense output.

curl
curl -G "https://finance-math.p.rapidapi.com/amortization" \
  -d "principal=250000" -d "annualRate=3.5" -d "termMonths=360" -d "limit=12" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "X-RapidAPI-Host: finance-math.p.rapidapi.com"

More than loans

The same listing computes compound interest with recurring contributions (/compound-interest), ROI with an annualized return (/roi), VAT add or extract (/vat), tip splitting (/tip), and break-even units (/breakeven). Every endpoint is pure, stateless math with nothing stored.

Run it in production

Finance Math has a permanent free tier — 1,000 requests a month, no credit card. Paid plans start at $5/month for 100,000 requests.

Get a free API key on RapidAPI ↗

Full endpoint reference →

FAQ

Is the amortization schedule accurate to the cent?

Yes. Payments and balances use the standard amortization formula rounded to two decimals, and known loans are hand-verified.

What inputs are required?

principal, annualRate (annual percentage), and termMonths. An annualRate of 0 is allowed; principal must be greater than 0.

Do you store any of my numbers?

No. Every endpoint is pure computation with nothing persisted.