For developers

A free public API for calculator math

Different from the iframe embed: this is a plain JSON API you call from your own app or backend, and render however you want. No API key, no signup — just a GET request.

Quick start

Mortgage payment for a $400,000 home, 20% down, 6.75%, 30-year term:

curl "https://calculatormatters.com/api/v1/mortgage?price=400000&down=80000&rate=6.75&term=30"
{
  "ok": true,
  "input": { "price": 400000, "down": 80000, "rate": 6.75, "term": 30 },
  "loanAmount": 320000,
  "monthlyPrincipalAndInterest": 2075.51,
  "termMonths": 360,
  "totalPaid": 747183.6,
  "totalInterest": 427183.6,
  "note": "Principal and interest only -- does not include property tax, insurance, PMI, or HOA. Educational estimate, not a loan offer or approval.",
  "source": "https://calculatormatters.com/finance/mortgage-calculator/"
}

Endpoints

GET /api/v1/mortgage

ParamTypeDescription
pricenumberHome price, greater than 0
downnumberDown payment amount, 0 to price
ratenumberAnnual interest rate, percent
termnumberLoan term in years

Returns loanAmount, monthlyPrincipalAndInterest, termMonths, totalPaid, and totalInterest. Principal and interest only — no tax, insurance, PMI, or HOA.

GET /api/v1/percentage

modeParamsAnswers
ofpercent, ofWhat is X% of Y?
findpart, wholeX is what % of Y?
changefrom, to% change from X to Y
curl "https://calculatormatters.com/api/v1/percentage?mode=of&percent=20&of=150"
{ "ok": true, "mode": "of", "input": { "percent": 20, "of": 150 }, "result": 30 }

Calling it from JavaScript

Direct fetch() — CORS is enabled, so this works from a browser with no server-side proxy:

const res = await fetch(
  "https://calculatormatters.com/api/v1/mortgage?price=400000&down=80000&rate=6.75&term=30"
)
const data = await res.json()
console.log(data.monthlyPrincipalAndInterest) // 2075.51

Or use the tiny wrapper script (no dependencies, no build step):

<script src="https://calculatormatters.com/widget.js"></script>
<script>
  CalcMatters.mortgage({ price: 400000, down: 80000, rate: 6.75, term: 30 })
    .then((r) => console.log(r.monthlyPrincipalAndInterest))

  CalcMatters.percentage({ mode: "of", percent: 20, of: 150 })
    .then((r) => console.log(r.result))
</script>

What you get

  • No API key, no signup, no rate-limit tier to pick — every endpoint is a plain GET request.
  • CORS-enabled, so a fetch() from your own site’s frontend JS works directly, no server-side proxy needed.
  • Same formula as the calculator page — when we correct or improve one, the API updates with it.
  • Responses are cache-friendly (Cache-Control: public, max-age=3600) since results are a pure function of the inputs.

Errors

A bad or missing parameter returns HTTP 400 with { "ok": false, "error": "..." } explaining what's wrong. A successful call always includes "ok": true.

API FAQ

Do I need an API key?

No. Every endpoint is open, unauthenticated, and free to call from a browser or a server.

What are the rate limits?

There is no published hard limit for reasonable use. This is a small, free service — please don’t hammer it in a tight loop or scrape it in bulk; cache results client-side where you can (the responses already send long-lived Cache-Control headers for exactly this).

Can I use this in a commercial app?

Yes, for personal or commercial use. We’d appreciate a link back to calculatormatters.com if you’re writing about it or crediting the source in your app, but it isn’t required.

Is the API result financial advice?

No. Every response is an educational estimate computed from the parameters you send — not a loan offer, quote, or professional recommendation. See the disclaimer on each calculator page for the full context.

Will you add more endpoints?

This is a new, deliberately small API — mortgage and percentage math to start. If there’s a specific calculator you’d like exposed as an endpoint, the contact page is the way to ask.

Try the Mortgage Calculator itself