81trust / 100

Calculators Loan Payment Calculator

by AgentTools in Markets & finance

x402 APIPassing, checked 2 min ago

Calculate the fixed monthly payment for a loan from its principal, annual interest rate and term in years, plus total repaid and total interest (annuity formula). Use this when an agent needs to monthly payment, total cost and interest for any loan.

GET https://agenttools-hub.vercel.app/api/v1/calculators/loan-payment-calculator

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
170 ms typical, 170 ms slowest 5%
Last check
2 min ago
Next check
in 27 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://agenttools-hub.vercel.app/api/v1/calculators/loan-payment-calculator?annualRate=4.5&principal=300000&years=30"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagenttools-hub.vercel.app%2Fapi%2Fv1%2Fcalculators%2Floan-payment-calculator
const res = await pay("https://agenttools-hub.vercel.app/api/v1/calculators/loan-payment-calculator?annualRate=4.5&principal=300000&years=30");
console.log(await res.json());

Example input

{
  "annualRate": 4.5,
  "principal": 300000,
  "years": 30
}

Example output

{
  "result": {
    "answer": "1,520.06 / month",
    "answerLabel": "360 monthly payments",
    "details": [
      {
        "label": "Total repaid",
        "value": "547,220.13"
      },
      {
        "label": "Total interest",
        "value": "247,220.13"
      },
      {
        "label": "Interest as % of principal",
        "value": "82.41%"
      }
    ],
    "steps": [
      "r = 4.5% ÷ 12 = 0.375% monthly",
      "n = 30 × 12 = 360 payments",
      "M = P · r · (1+r)ⁿ ÷ ((1+r)ⁿ − 1) = 1,520.06"
    ],
    "value": 1520.055929
  },
  "tool": "loan-payment-calculator"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 min agoPassed402170 ms$0.003
5 h agoPassed402235 ms$0.003