Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

Debt Payoff Calculator API

Compare the avalanche (highest APR first) and snowball (smallest balance first) debt payoff strategies: months to debt-free, total interest and payoff order.

POST /api/v1/tools/debt-payoff-calculatorMCP debt_payoff_calculatorCalculators

List your debts and an extra monthly budget to compare the snowball and avalanche payoff methods: debt-free date, total interest and the order each debt clears.

Input

Send these as a JSON object. Unknown fields are rejected.

debts
JSON array of 1 to 20 debts, each {"name": string, "balance": number, "apr": number (percent), "minimum": number (monthly minimum payment)}. Names must be distinct. (string, up to 20000 characters, required)
extra
Extra amount paid each month on top of all the minimums. (number, 0 to …, default 0)
curl https://pithlab.com/api/v1/tools/debt-payoff-calculator \n  -H "Authorization: Bearer $PITHLAB_KEY" \n  -H "Content-Type: application/json" \n  -d '{"debts":"[{\"name\":\"Credit card\",\"balance\":4000,\"apr\":22.9,\"minimum\":100},{\"name\":\"Car loan\",\"balance\":8000,\"apr\":6.5,\"minimum\":220},{\"name\":\"Store card\",\"balance\":900,\"apr\":18.9,\"minimum\":35}]","extra":200}'
Example response
{
  "ok": true,
  "result": {
    "debts": [
      {
        "name": "Credit card",
        "balance": 4000,
        "apr": 22.9,
        "minimum": 100
      },
      {
        "name": "Car loan",
        "balance": 8000,
        "apr": 6.5,
        "minimum": 220
      },
      {
        "name": "Store card",
        "balance": 900,
        "apr": 18.9,
        "minimum": 35
      }
    ],
    "budget": 555,
    "totalDebt": 12900,
    "avalanche": {
      "paidOff": true,
      "strategy": "avalanche",
      "months": 27,
      "totalInterest": 1590.33,
      "totalPaid": 14490.33,
      "order": [
        {
          "name": "Credit card",
          "month": 16
        },
        {
          "name": "Store card",
          "month": 18
        },
        {
          "name": "Car loan",
          "month": 27
        }
      ]
    },
    "snowball": {
      "paidOff": true,
      "strategy": "snowball",
      "months": 27,
      "totalInterest": 1631.01,
      "totalPaid": 14531.01,
      "order": [
        {
          "name": "Store card",
          "month": 4
        },
        {
          "name": "Credit card",
          "month": 18
        },
        {
          "name": "Car loan",
          "month": 27
        }
      ]
    },
    "interestSaved": 40.68,
    "comparison": "Avalanche saves 40.68 in interest.",
    "text": "Avalanche: debt-free in 2 years 3 months, total interest 1,590.33. Snowball: debt-free in 2 years 3 months, total interest 1,631.01. Avalanche saves 40.68 in interest."
  }
}