Calculators
Debt payoff timeline API
Compute months to clear a balance under a fixed monthly payment via the loan-amortization identity n = −ln(1 − i·B/PMT)/ln(1+i), returning months, years, total interest, and total paid, and rejecting payments below the first month's interest (which never amortize). Answers 'how long to pay off 5k at 18%','total interest on my credit card','months to clear this debt at 200 a month'.
Price$0.01per request
MethodPOST
Route/v1/calc/pf-debt-payoff
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calcdebt-payoffamortizationcredit-cardinterestloanpersonal-financepayoff
API URL
Integration docshttps://x402.hexl.dev/v1/calc/pf-debt-payoffExample request
{
"balance": 5000,
"annualRatePercent": 18,
"monthlyPayment": 200
}Example response
{
"formula": "months = −ln(1 − i·B/PMT) / ln(1+i)",
"monthsToPayoff": 32,
"yearsToPayoff": 2.7,
"totalInterestPaid": 1313.6,
"totalPaid": 6313.6,
"breakdown": {
"balance": 5000,
"annualRatePercent": 18,
"monthlyPayment": 200,
"monthlyRate": 0.015
}
}Input schema
{
"type": "object",
"required": [
"balance",
"annualRatePercent",
"monthlyPayment"
],
"properties": {
"balance": {
"type": "number",
"examples": [
5000
]
},
"annualRatePercent": {
"type": "number",
"description": "APR in percent",
"examples": [
18
]
},
"monthlyPayment": {
"type": "number",
"examples": [
200
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}