Calculators
Student loan calculator API
Amortizes a student loan via M = P*r/(1-(1+r)^-n) and optionally scores affordability against the 8%-of-gross-income rule of thumb. Answers 'What is my student loan payment?','Is my student loan payment affordable on my income?'.
Price$0.01per request
MethodPOST
Route/v1/calc/loan-student
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
loanstudenteducationamortizationaffordabilityincomecalculator
API URL
Integration docshttps://x402.hexl.dev/v1/calc/loan-studentExample request
{
"balance": 30000,
"annualRatePct": 5,
"termMonths": 120,
"grossMonthlyIncome": 4000
}Example response
{
"monthlyPayment": 318.2,
"totalPaid": 38183.59,
"totalInterest": 8183.59,
"termMonths": 120,
"breakdown": {
"balance": 30000,
"annualRatePct": 5,
"termMonths": 120
},
"paymentToIncomeRatio": 0.0795,
"paymentToIncomePct": 7.95,
"affordable": true,
"affordabilityNote": "Within the 8%-of-gross rule of thumb."
}Input schema
{
"type": "object",
"required": [
"balance",
"annualRatePct",
"termMonths"
],
"properties": {
"balance": {
"type": "number",
"description": "Loan balance.",
"examples": [
30000
]
},
"annualRatePct": {
"type": "number",
"description": "Annual nominal rate in percent.",
"examples": [
5
]
},
"termMonths": {
"type": "number",
"description": "Term in months.",
"examples": [
120
]
},
"grossMonthlyIncome": {
"type": "number",
"description": "Optional gross monthly income for the 8% affordability test.",
"examples": [
4000
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}