API Almanac
API reference › Loan

Monthly payment, total interest, yearly summary and optional full schedule for a loan or mortgage

GET/v1/loan

GET/v1/loan

Monthly payment, total interest, yearly summary and optional full schedule for a loan or mortgage

rate is the annual percentage rate. Give years or months. extra is an additional principal payment each month; start dates the schedule.

PARAMETERS
principalquery · numberREQUIRED
Amount borrowed
e.g. 400000
ratequery · numberREQUIRED
Annual interest rate, percent
e.g. 6.25
yearsquery · number
Term in years
e.g. 30
monthsquery · integer
Term in months (overrides years)
e.g. 1
extraquery · number
Extra principal paid every month
e.g. 0
startquery · string
Date of the first payment
e.g. string
schedulequery · boolean
Include every monthly row (up to 1,200)
e.g. false
In the full reference
REQUEST
curl "https://api.apialmanac.com/v1/loan?principal=400000&rate=6.25" \
  -H "X-API-Key: YOUR_KEY"
RESPONSE
200OK
{
  "principal": 400000,
  "rate": 6.25,
  "months": 360,
  "payment": 2462.87,
  "total_paid": 886633.2,
  "total_interest": 486633.2,
  "extra": 0,
  "payoff_months": 360,
  "payoff_date": null,
  "yearly": [
    {
      "year": 1,
      "paid": 29554.44,
      "principal": 4694.14,
      "interest": 24860.3,
      "balance": 395305.86
    }
  ],
  "schedule": []
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.