Calculators
Loan payment calculator API
Computes the fully-amortizing monthly payment via M = P*r/(1-(1+r)^-n) and returns total paid, total interest, and an interest-vs-principal breakdown. Answers 'What is the monthly payment on this loan?','How much total interest will I pay?'.
Price$0.01per request
MethodPOST
Route/v1/calc/loan-payment
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
loanamortizationmortgagepaymentinterestfinancecalculator
API URL
Integration docshttps://x402.hexl.dev/v1/calc/loan-paymentExample request
{
"principal": 250000,
"annualRatePct": 6.5,
"termMonths": 360
}Example response
{
"monthlyPayment": 1580.17,
"totalPaid": 568861.22,
"totalInterest": 318861.22,
"principal": 250000,
"termMonths": 360,
"annualRatePct": 6.5,
"formula": "M = P*r/(1-(1+r)^-n), r = monthly rate",
"breakdown": {
"principal": 250000,
"interest": 318861.22,
"interestShareOfPayments": 0.5605
}
}Input schema
{
"type": "object",
"required": [
"principal",
"annualRatePct",
"termMonths"
],
"properties": {
"principal": {
"type": "number",
"description": "Loan principal in currency units.",
"examples": [
250000
]
},
"annualRatePct": {
"type": "number",
"description": "Annual nominal interest rate in percent.",
"examples": [
6.5
]
},
"termMonths": {
"type": "number",
"description": "Term in months.",
"examples": [
360
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}