Skip to content

Calculator API

Three public endpoints, served from https://freecalculator.tech. JSON in, JSON out, no API key. The machine-readable description is at /api/openapi.json.

Authentication

None. Requests are anonymous and rate limited per caller. The service is built so that API keys and higher limits for approved applications can be added later without changing the request format.

GET /api/ai/tools

Lists every published calculator available to AI systems, with its category, description, inputs, outputs, formula, version and public address.

curl https://freecalculator.tech/api/ai/tools

GET /api/ai/tools/{slug}

One calculator in full: input descriptors and JSON Schema, output schema, methodology, worked example, assumptions, limitations, questions, related tools and — where a person has checked it — a review date and source.

curl https://freecalculator.tech/api/ai/tools/mortgage-calculator

POST /api/tools/{slug}/calculate

Runs the calculator. The body is an object whose keys are the input names from the tool's schema. Inputs with a default may be omitted.

curl -X POST https://freecalculator.tech/api/tools/mortgage-calculator/calculate \
  -H "Content-Type: application/json" \
  -d '{"homePrice":400000,"downPayment":80000,"rate":6.5,"years":30}'
{
  "tool": "Mortgage Calculator",
  "tool_slug": "mortgage-calculator",
  "tool_version": "1",
  "calculation_timestamp": "2026-01-01T12:00:00.000Z",
  "result": {
    "primary": "$2,022.62",
    "principal_and_interest": "$2,022.62",
    "total_interest": "$408,142.36"
  },
  "calculation": { "formula": "M = P × [r(1+r)^n] ÷ [(1+r)^n−1]", "assumptions": ["..."] },
  "disclaimer": "Estimate for informational purposes only; not financial advice.",
  "source_url": "https://freecalculator.tech/tools/mortgage-calculator"
}

Errors

Failures return the same shape, with the HTTP status matching the problem. Internal details are never included.

{ "error": { "code": "INVALID_INPUT", "field": "rate", "message": "Enter a number up to 100." } }
StatusCode
400INVALID_JSON, INVALID_INPUT, MISSING_INPUT, UNKNOWN_FIELD, CALCULATION_FAILED
404TOOL_NOT_FOUND
413PAYLOAD_TOO_LARGE
429RATE_LIMITED
503API_DISABLED, CATALOGUE_UNAVAILABLE

Rate limits and size limits

Anonymous callers get 60 requests a minute by default; over that you get a 429 with a Retry-After header. Request bodies are capped (16 KB by default) and each input value is capped in length. Website visitors are not affected: calculations on the site run in the browser and never touch these endpoints.

Attribution and usage policy

Every result includes source_url. Show it with the number, credit "Free Calculator", and don't present results as personal financial, medical or legal advice. Cache responses, don't scrape in bulk, and see the MCP documentation if your client speaks that protocol.