The Safe Withdrawal Rate (SWR) is a critical metric for retirees determining how much money they can take out of their investment portfolio each year without running out of funds before the end of their lives. Historically, the "4% Rule" has been the benchmark for a 30-year retirement period, but individual factors like inflation, market volatility, and life expectancy can shift this number.
How This Calculator Works
This tool simulates the depletion of your retirement nest egg based on your specific inputs. Unlike basic calculators, it accounts for both the growth of your investments and the eroding power of inflation on your purchasing power. Each year, your withdrawal amount increases by the inflation rate to maintain your standard of living, while the remaining balance continues to earn the growth rate you specify.
Key Factors in Your Calculation
Initial Withdrawal Rate: The percentage of your total portfolio you take out in the first year of retirement.
Annual Inflation: This increases your withdrawal amount every year. If you start with $40,000 and inflation is 3%, year two requires $41,200 to buy the same goods.
Portfolio Growth: The average annual return you expect from your mix of stocks, bonds, and cash.
Sequence of Returns Risk: While this calculator uses an average, remember that poor market performance in the early years of retirement can significantly impact the "safeness" of your rate.
Example Scenario
If you have a $1,000,000 portfolio and choose a 4% withdrawal rate, you will withdraw $40,000 in Year 1 ($3,333/month). If inflation is 3% and your portfolio grows at 6%, your balance at the start of Year 2 would be approximately $1,017,600 after accounting for growth and the initial withdrawal, while your new withdrawal amount would be $41,200.
function calculateSWR() {
var portfolio = parseFloat(document.getElementById('portfolioValue').value);
var rate = parseFloat(document.getElementById('withdrawalRate').value) / 100;
var inflation = parseFloat(document.getElementById('inflationRate').value) / 100;
var growth = parseFloat(document.getElementById('growthRate').value) / 100;
var years = parseInt(document.getElementById('timeHorizon').value);
if (isNaN(portfolio) || isNaN(rate) || isNaN(inflation) || isNaN(growth) || isNaN(years)) {
alert("Please enter valid numeric values in all fields.");
return;
}
var currentBalance = portfolio;
var initialWithdrawal = portfolio * rate;
var currentWithdrawal = initialWithdrawal;
var isBroke = false;
var yearBroke = 0;
for (var i = 1; i <= years; i++) {
// Subtract withdrawal at beginning of year (common SWR model)
currentBalance -= currentWithdrawal;
if (currentBalance < 0) {
isBroke = true;
yearBroke = i;
currentBalance = 0;
break;
}
// Apply growth to remaining balance
currentBalance *= (1 + growth);
// Adjust withdrawal for inflation for next year
currentWithdrawal *= (1 + inflation);
}
// Display Results
document.getElementById('swrResults').style.display = 'block';
document.getElementById('yearOneAnnual').innerText = '$' + initialWithdrawal.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('yearOneMonthly').innerText = '$' + (initialWithdrawal / 12).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
if (isBroke) {
document.getElementById('finalYearIncome').innerText = "N/A (Funds exhausted)";
document.getElementById('remainingBalance').innerText = "$0.00";
document.getElementById('statusBox').innerText = "⚠️ Warning: Portfolio exhausted in Year " + yearBroke;
document.getElementById('statusBox').style.color = "#c53030";
} else {
document.getElementById('finalYearIncome').innerText = '$' + currentWithdrawal.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('remainingBalance').innerText = '$' + currentBalance.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('statusBox').innerText = "✅ Strategy Sustainable for " + years + " Years";
document.getElementById('statusBox').style.color = "#2f855a";
}
// Smooth scroll to results
document.getElementById('swrResults').scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}