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.
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 —
/api/calculate/compound - Loan amortization —
/api/calculate/loan - Debt snowball / avalanche —
/api/calculate/debt-snowball
Compound interest
GET /api/calculate/compoundFuture value of an initial amount plus optional monthly contributions, compounded daily/monthly/annually. Returns year-by-year schedule.
| Param | Type | Default | Description |
|---|---|---|---|
initial | number | 0 | Starting balance |
monthly | number | 0 | Monthly contribution |
rate | number | 7 | Annual % return (e.g., 7 for 7%) |
years | number | 30 | Time horizon (1–100) |
compounding | string | monthly | daily | monthly | annually |
currency | string | USD | ISO 4217 currency code |
https://snowballr.io/api/calculate/compound?initial=10000&monthly=500&rate=7&years=30{
"@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/loanMonthly payment + total interest for any fixed-rate loan. Optional extra monthly payment shows months and interest saved.
| Param | Type | Default | Description |
|---|---|---|---|
principal | number | 300000 | Loan amount |
rate | number | 6.5 | Annual APR |
years | number | 30 | Loan term |
extra | number | 0 | Extra monthly payment |
currency | string | USD | ISO 4217 currency code |
https://snowballr.io/api/calculate/loan?principal=300000&rate=6.5&years=30&extra=200{
"@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-snowballPay-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).
| Param | Type | Default | Description |
|---|---|---|---|
debts | JSON array | — | Array of { name, balance, rate, minPayment } |
extra | number | 0 | Extra monthly payment above all minimums |
strategy | string | snowball | snowball | avalanche |
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{
"@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
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.92import 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.92curl "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.