Use this calculator to plan your debt repayment using the snowball method. Enter details for each of your debts, and an extra amount you can pay each month. The calculator will sort your debts by balance (smallest to largest) and apply your extra payment to the smallest debt first. Once a debt is paid off, its minimum payment (plus any extra payment) will "snowball" into the next smallest debt.
`;
debtInputsDiv.appendChild(newDebtRow);
}
function removeDebtRow(rowId) {
var rowToRemove = document.getElementById(rowId);
if (rowToRemove) {
rowToRemove.parentNode.removeChild(rowToRemove);
}
}
function calculateSnowball() {
var extraPayment = parseFloat(document.getElementById('extraPayment').value);
var resultDiv = document.getElementById('snowballResult');
resultDiv.innerHTML = "; // Clear previous results
if (isNaN(extraPayment) || extraPayment < 0) {
resultDiv.innerHTML = 'Please enter a valid non-negative extra monthly payment.';
return;
}
var debts = [];
var debtRows = document.getElementById('debtInputs').getElementsByClassName('debt-row');
if (debtRows.length === 0) {
resultDiv.innerHTML = 'Please add at least one debt to calculate.';
return;
}
for (var i = 0; i < debtRows.length; i++) {
var rowId = debtRows[i].id.split('_')[1];
var debtName = document.getElementById('debtName_' + rowId).value;
var balance = parseFloat(document.getElementById('balance_' + rowId).value);
var interestRate = parseFloat(document.getElementById('interestRate_' + rowId).value);
var minPayment = parseFloat(document.getElementById('minPayment_' + rowId).value);
if (!debtName.trim()) {
debtName = "Debt " + rowId; // Default name if left blank
}
if (isNaN(balance) || balance < 0 || isNaN(interestRate) || interestRate < 0 || isNaN(minPayment) || minPayment 0 && minPayment === 0) {
resultDiv.innerHTML = 'Debt "' + debtName + '" has a balance but no minimum payment. Please enter a minimum payment.';
return;
}
if (balance > 0 && minPayment > 0 && minPayment * 12 < balance * (interestRate / 100)) {
// This is a simplified check, but indicates minimum payment might not even cover interest
// A more robust check would be if minPayment < (balance * monthly_rate)
var monthlyInterest = balance * (interestRate / 100 / 12);
if (minPayment 0) {
resultDiv.innerHTML = 'Warning: Minimum payment for "' + debtName + '" ($' + minPayment.toFixed(2) + ') is less than its monthly interest ($' + monthlyInterest.toFixed(2) + '). This debt will never be paid off with just minimum payments. Please increase the minimum payment or extra payment.';
return;
}
}
debts.push({
name: debtName,
originalBalance: balance,
currentBalance: balance,
interestRate: interestRate,
minPayment: minPayment,
paidOff: false,
totalInterestPaid: 0
});
}
// Sort debts by current balance (smallest to largest) for snowball method
debts.sort(function(a, b) {
return a.currentBalance – b.currentBalance;
});
var totalMonths = 0;
var overallTotalInterestPaid = 0;
var repaymentSchedule = [];
var activeDebts = debts.filter(function(debt) { return debt.currentBalance > 0; });
if (activeDebts.length === 0) {
resultDiv.innerHTML = 'All debts are already paid off!';
return;
}
var maxIterations = 1200; // Cap at 100 years to prevent infinite loops
while (activeDebts.length > 0 && totalMonths < maxIterations) {
totalMonths++;
var monthDetails = { month: totalMonths, payments: {}, balances: {} };
var availableSnowballPayment = extraPayment;
// Add minimum payments from paid-off debts to the snowball
for (var j = 0; j 0) { // Only roll over if it had an original balance
availableSnowballPayment += debts[j].minPayment;
}
}
// Apply minimum payments and calculate interest for active debts
for (var k = 0; k < activeDebts.length; k++) {
var debt = activeDebts[k];
var monthlyInterestRate = debt.interestRate / 100 / 12;
var interestThisMonth = debt.currentBalance * monthlyInterestRate;
debt.totalInterestPaid += interestThisMonth;
overallTotalInterestPaid += interestThisMonth;
var paymentApplied = Math.min(debt.minPayment, debt.currentBalance + interestThisMonth); // Don't overpay if balance is low
debt.currentBalance -= (paymentApplied – interestThisMonth); // Reduce principal
monthDetails.payments[debt.name] = paymentApplied;
monthDetails.balances[debt.name] = debt.currentBalance;
}
// Apply snowball payment to the smallest active debt
var smallestDebtIndex = -1;
for (var l = 0; l < activeDebts.length; l++) {
if (!activeDebts[l].paidOff) {
smallestDebtIndex = l;
break;
}
}
if (smallestDebtIndex !== -1) {
var smallestDebt = activeDebts[smallestDebtIndex];
var paymentToSmallest = Math.min(availableSnowballPayment, smallestDebt.currentBalance + (smallestDebt.currentBalance * (smallestDebt.interestRate / 100 / 12))); // Don't overpay
smallestDebt.currentBalance -= paymentToSmallest;
monthDetails.payments[smallestDebt.name] = (monthDetails.payments[smallestDebt.name] || 0) + paymentToSmallest;
monthDetails.balances[smallestDebt.name] = smallestDebt.currentBalance;
}
repaymentSchedule.push(monthDetails);
// Check for paid-off debts and update activeDebts
var newActiveDebts = [];
for (var m = 0; m < activeDebts.length; m++) {
if (activeDebts[m].currentBalance = maxIterations) {
resultDiv.innerHTML = 'Calculation stopped after ' + maxIterations + ' months. It seems your debts might not be paid off within this timeframe with the current payments. Please review your inputs.';
return;
}
// Display Results
var years = Math.floor(totalMonths / 12);
var months = totalMonths % 12;
var resultsHtml = '
Your Snowball Debt Repayment Plan
';
resultsHtml += 'Total Time to Debt Freedom: ' + (years > 0 ? years + ' years ' : ") + months + ' months';
resultsHtml += 'Total Interest Paid: $' + overallTotalInterestPaid.toFixed(2) + '';
resultsHtml += '
Debt Payoff Order:
';
resultsHtml += '
Debt Name
Original Balance
Total Interest Paid
Payoff Month
';
// Sort debts by payoff month for display
var sortedForDisplay = debts.filter(function(debt) { return debt.originalBalance > 0; }).sort(function(a, b) {
var payoffMonthA = 0;
for (var i = 0; i < repaymentSchedule.length; i++) {
if (repaymentSchedule[i].balances[a.name] <= 0.01) {
payoffMonthA = repaymentSchedule[i].month;
break;
}
}
var payoffMonthB = 0;
for (var i = 0; i < repaymentSchedule.length; i++) {
if (repaymentSchedule[i].balances[b.name] <= 0.01) {
payoffMonthB = repaymentSchedule[i].month;
break;
}
}
return payoffMonthA – payoffMonthB;
});
for (var i = 0; i < sortedForDisplay.length; i++) {
var debt = sortedForDisplay[i];
var payoffMonth = 0;
for (var j = 0; j < repaymentSchedule.length; j++) {
if (repaymentSchedule[j].balances[debt.name] <= 0.01) {
payoffMonth = repaymentSchedule[j].month;
break;
}
}
resultsHtml += '
';
resultsHtml += '
' + debt.name + '
';
resultsHtml += '
$' + debt.originalBalance.toFixed(2) + '
';
resultsHtml += '
$' + debt.totalInterestPaid.toFixed(2) + '
';
resultsHtml += '
Month ' + payoffMonth + '
';
resultsHtml += '
';
}
resultsHtml += '
';
resultDiv.innerHTML = resultsHtml;
}
Understanding the Snowball Method
The debt snowball method is a debt reduction strategy where you pay off debts in order of smallest balance first, regardless of the interest rate. Once the smallest debt is paid off, you take the money you were paying on that debt and add it to the minimum payment of the next smallest debt. This creates a "snowball" effect, where your payments grow larger and larger as each debt is eliminated.
How it Works:
List Your Debts: Gather all your debts (credit cards, personal loans, student loans, etc.) and list them from the smallest outstanding balance to the largest.
Make Minimum Payments: Continue to make the minimum required payments on all your debts, except for the smallest one.
Attack the Smallest Debt: Take any extra money you can find in your budget (your "Extra Monthly Payment" in the calculator) and apply it entirely to the smallest debt.
Snowball! Once the smallest debt is completely paid off, take the money you were paying on that debt (its minimum payment plus the extra payment) and add it to the minimum payment of the next smallest debt.
Repeat: Continue this process until all your debts are paid off.
Benefits of the Snowball Method:
Psychological Wins: Paying off the smallest debt quickly provides a powerful psychological boost, motivating you to continue.
Momentum: The "snowball" effect builds momentum, making it feel easier to tackle larger debts as you progress.
Simplicity: It's straightforward to understand and implement, making it a popular choice for those who need a clear path to debt freedom.
Why Use This Calculator?
This calculator helps you visualize the snowball method in action. By inputting your specific debts and an extra payment amount, you can:
See the exact order your debts will be paid off.
Understand the total time it will take to become debt-free.
Calculate the total interest you will pay over the repayment period.
Adjust your extra payment to see how it impacts your payoff timeline and total interest.
While the debt avalanche method (paying highest interest rate first) can save more money on interest, the snowball method is often more effective for individuals who need motivation and quick wins to stay committed to their debt repayment journey.