Snowballr provides financial education, not investment advice. Verify any advisor on FINRA BrokerCheck.
API DOCS

Snowballr Calculator API

Free, no-auth JSON endpoints for compound interest, loan amortization, and debt payoff. CORS-enabled. Schema.org compatible. Use them in your app, agent, spreadsheet, or AI tool.

License & attribution

All API responses are licensed under CC-BY 4.0. Commercial use OK. Attribute as: Calculations by Snowballr (snowballr.io) with a backlink.

Endpoints

Compound interest

GET /api/calculate/compound

Future value of an initial amount plus optional monthly contributions, compounded daily/monthly/annually. Returns year-by-year schedule.

Query parameters
ParamTypeDefaultDescription
initialnumber0Starting balance
monthlynumber0Monthly contribution
ratenumber7Annual % return (e.g., 7 for 7%)
yearsnumber30Time horizon (1–100)
compoundingstringmonthlydaily | monthly | annually
currencystringUSDISO 4217 currency code
Example request
https://snowballr.io/api/calculate/compound?initial=10000&monthly=500&rate=7&years=30
Example response
{
  "@context": "https://schema.org",
  "@type": "Dataset",
  "name": "Compound interest calculation: USD 10000 + USD 500/mo at 7% for 30 years",
  "inputs": { "initial": 10000, "monthly": 500, "rate": 7, "years": 30, "compounding": "monthly", "currency": "USD" },
  "result": {
    "finalBalance": 690918.92,
    "totalContributions": 190000,
    "totalGrowth": 500918.92,
    "cagr": 7,
    "multiple": 3.64
  },
  "schedule": [
    { "year": 1, "balance": 16906.04, "contributions": 16000, "growth": 906.04 },
    ...
  ],
  "source": "https://snowballr.io",
  "citation": "Snowballr Compound Interest API — https://snowballr.io/api-docs",
  "license": "https://creativecommons.org/licenses/by/4.0/"
}

Loan amortization

GET /api/calculate/loan

Monthly payment + total interest for any fixed-rate loan. Optional extra monthly payment shows months and interest saved.

Query parameters
ParamTypeDefaultDescription
principalnumber300000Loan amount
ratenumber6.5Annual APR
yearsnumber30Loan term
extranumber0Extra monthly payment
currencystringUSDISO 4217 currency code
Example request
https://snowballr.io/api/calculate/loan?principal=300000&rate=6.5&years=30&extra=200
Example response
{
  "@context": "https://schema.org",
  "@type": "Dataset",
  "inputs": { "principal": 300000, "rate": 6.5, "years": 30, "extraMonthly": 200, "currency": "USD" },
  "result": {
    "monthlyPayment": 1896.20,
    "totalPayment": 622461.06,
    "totalInterest": 282461.06,
    "monthsToPayoff": 313,
    "yearsToPayoff": 26.08,
    "interestSavedFromExtra": 65171.97,
    "monthsSavedFromExtra": 47
  },
  "schedule": [...]
}

Debt snowball / avalanche

GET /api/calculate/debt-snowball

Pay-off plan for up to 20 debts using snowball or avalanche method. Returns comparison between both. Accepts GET (query string JSON) or POST (JSON body).

Query parameters
ParamTypeDefaultDescription
debtsJSON arrayArray of { name, balance, rate, minPayment }
extranumber0Extra monthly payment above all minimums
strategystringsnowballsnowball | avalanche
Example request
https://snowballr.io/api/calculate/debt-snowball?extra=300&strategy=snowball&debts=%5B%7B%22name%22%3A%22Card%20A%22%2C%22balance%22%3A4000%2C%22rate%22%3A22%2C%22minPayment%22%3A80%7D%2C%7B%22name%22%3A%22Card%20B%22%2C%22balance%22%3A8000%2C%22rate%22%3A18%2C%22minPayment%22%3A160%7D%5D
Example response
{
  "@context": "https://schema.org",
  "@type": "Dataset",
  "inputs": { "debts": [...], "extraPayment": 300, "strategy": "snowball" },
  "result": {
    "monthsToFree": 28,
    "totalInterest": 2240.15,
    "payoffOrder": [
      { "month": 12, "debtPaidOff": "Card A" },
      { "month": 28, "debtPaidOff": "Card B" }
    ]
  },
  "comparison": {
    "snowball": { "monthsToFree": 28, "totalInterest": 2240.15 },
    "avalanche": { "monthsToFree": 27, "totalInterest": 2102.84 },
    "avalancheSavesInterest": 137.31
  }
}

Code samples

JavaScript (fetch)
const url = "https://snowballr.io/api/calculate/compound?initial=10000&monthly=500&rate=7&years=30";
const data = await fetch(url).then(r => r.json());
console.log(data.result.finalBalance);
// 690918.92
Python (requests)
import requests
r = requests.get("https://snowballr.io/api/calculate/compound", params={
    "initial": 10000, "monthly": 500, "rate": 7, "years": 30,
})
print(r.json()["result"]["finalBalance"])
# 690918.92
curl
curl "https://snowballr.io/api/calculate/loan?principal=300000&rate=6.5&years=30&extra=200"

FAQs

Is there a rate limit?

Responses are cached at the edge for 24 hours. Please be reasonable. For high-volume use, consider self-hosting using our open formula reference at /compound-interest-formula.

What about authentication?

None. No keys, no tokens, no sign-up.

Will the response format change?

Additive only. We will not rename or remove existing fields without 6 months notice. New fields may appear in the result or schedule objects.

Want more endpoints?

We're working on retirement (4% rule), mortgage refinance, Roth vs Traditional, and FIRE projections. Suggest one →

Last updated 2026. Hosted on Vercel edge — typical response time < 100 ms worldwide.