No one wants to run out of money before they die.

But making sure your nest egg will last is a challenge because you're dealing with a lot of unknowns: How long will you live? Will you face costly health crises? How will the market and the economy perform while you're in retirement?

That makes it difficult to figure out how much you can take every year from your portfolio and not outlive your money. But there are various rules of thumb to help you gauge a sustainable withdrawal rate.

These rules are typically derived from complex simulations based on historical returns, economic projections, and assumptions that you will live 30 years in retirement and have a balanced portfolio of either 50-50 or 60-40 stocks to bonds.

The end result should give you a very high probability (85 to 90 per cent) that you won't deplete your portfolio before you die. That means it won't go to zero. But it also means you could die with as much, if not more, money than you started with.

Keep in mind, though, any rule of thumb is simply a guidepost because the best answer for you will depend on your individual situation.

RULES OF THUMB FOR SUSTAINABLE WITHDRAWAL RATES

One rule is a "percent of portfolio" withdrawal strategy. You take 4 per cent or 5 per cent of your portfolio every year no matter what. You don't adjust for inflation or market performance. Say you choose 5 per cent and have a starting portfolio of $1 million. If the portfolio falls to $800,000, your annual withdrawal drops from $50,000 to $40,000. If the portfolio grows to $1.2 million, it increases from $50,000 to $60,000.

A more complicated but flexible strategy that might be easiest to employ if you're working with a financial adviser is called the "dynamic spending rule." Generally speaking you set a floor and a ceiling for your annual withdrawal rates based on the size of your portfolio when you start retirement and each subsequent year's withdrawal rate falls within that range on the basis of market performance.

Perhaps the best known rule of thumb is the "4 per cent rule" -- derived by financial adviser William Bengen in the mid-1990s, who subsequently revised his recommendation to 4.7 per cent. Based on the size of your portfolio when you retire, you withdraw 4 per cent of that total amount for the first year. So if you have $1 million, you withdraw $40,000. Then you adjust that amount for inflation in each subsequent year. If there's 3 per cent inflation, you withdraw $41,200 in Year 2. Then you adjust that amount for inflation in Year 3 and so on.

Given current market and economic conditions -- both stocks and bonds have been in bear market territory and inflation is high -- coupled with anticipation that market returns and economic growth may be more moderate in the next several decades, Morningstar and Vanguard suggest the 4 per cent level may now be too aggressive. A more sustainable withdrawal rate might be 3.3%, according to Morningstar, or between 2.8 per cent and 3.3 per cent according to Vanguard.

Bengen attributes the difference between his recommendation and Morningstar's partly to how long each assumes market returns will be tempered. Meanwhile, he's keeping an eye on inflation to see if he needs to rethink his 4.7 per cent recommendation.

"If inflation persists through the end of this decade at much higher levels, the 4.7 per cent rule might have to be adjusted," he told CNN Business. "Since the outcome is still in doubt, I recommend that folks adopt a more conservative withdrawal rate, perhaps 4.5 per cent, until this is all sorted out."

WHAT REAL-LIFE RETIREES DO

As you can see, there is no general consensus among financial experts on the best withdrawal rate to insure you don't run out of money but also have a good living standard in retirement.

With any of the strategies, you could die with $1 in your portfolio or $5 million. "It's like the cone of uncertainty in a hurricane," certified financial planner Mari Adam said. "Every year you have a certain amount of error."

A recent analysis by JPMorgan found that applying the 4 per cent rule to rolling 30-year historical periods since 1928, investors ended up with five times the amount of money they started with roughly a quarter of the time.

"This may be a positive outcome if an investor's goal is to leave a legacy. It may be a poor outcome if lifestyle sacrifices were made along the way to keep spending low relative to how the portfolio was performing over time," the bank's report said.

Adam has found that people either don't take out nearly enough, if anything, or they just blithely assume a withdrawal strategy of 10 per cent a year is a good strategy. (It is not, she noted.)

For her clients, she recalculates their withdrawal rates every year based on market performance and other factors. But for those not working with an adviser, she recommends keeping things very simple.

"I've never seen anyone go broke taking 5 per cent a year (and not adjusting for inflation)," she said.

Generally speaking she thinks the 4 per cent rule is a fair guardrail against people just taking what they feel like. But she doesn't recommend always adjusting for inflation.

"I'm as comfortable with that 4 per cent as any other number -- just don't bump it up by inflation without looking. If inflation is up 10 per cent this year and the market is down I wouldn't try to hold your spending to the same [inflation-adjusted] level."

What ultimately will make your retirement financially secure is not whether you withdraw 3, 4 or 5 per cent, Adam said. It's whether you use the levers at your disposal to lessen your need to drain your portfolio just to cover expenses. That could mean, for instance, retiring a little later, working part-time in retirement, delaying Social Security until age 70 or downsizing your home.

So, she added, don't sweat the withdrawal rate question too much. "If you live 30 years, [you can correct] if you take too much one year."