This article originally appeared on NerdWallet.com

By J.R. Robinson

Retirement planning is by far the most important financial objective for millions of Americans who are near or at the end of their careers. For many retirees, income from guaranteed sources such as Social Security and pensions must be supplemented with withdrawals from personal savings.

The main challenge is balancing the need to maintain one’s standard of living against the risk of running out of money.

Scores of retirement-spending apps have been developed to help people prepare for income sustainability. These apps are often provided for free as a marketing tool from firms such as Vanguard, T. Rowe Price, Schwab, Betterment and Personal Capital. Other retirement apps are sold as subscriptions to financial advisors who use them with their clients.

Unfortunately, the design features, assumptions and methodologies vary from app to app, and the results often vary by a wide margin, too.

Which ones can be relied upon for important withdrawal and sustainability decisions? Here are some ways to identify app features that may lead to more useful results.

1. Realistic model design

There are two types of factors to consider when assessing retirement preparedness: those that are within your control and those that are beyond your control. Factors over which you have at least some control include your annual withdrawal amount, an annual cost-of-living increase, asset allocation, investment expenses and withdrawal strategy selection.

You might expect that these would be basic input features on most of these apps. This is not the case. Surprisingly, many of the most popular retirement spending apps today fail to account for the impact of investment expenses or do not allow you to test how different inflation adjustments may affect results.

Similarly, nearly all calculators illustrate only a single withdrawal strategy that assumes proportional spending from each asset class with automatic rebalancing of your portfolio. Research has suggested that such a strategy may not be the most efficient approach and has highlighted the need for apps to illustrate alternative withdrawal plans. The better the app is able to adjust to the user’s real-world portfolio strategy, the more useful the output should be.

2. Monte Carlo simulation methodology

Market returns are, of course, beyond your control. They are also beyond the app’s control — even the most sophisticated retirement-income apps have virtually no predictive ability. What they can do, though, is consider a range of reasonably realistic outcomes, including scenarios that may be as bad as or worse than the historical record. In other words, the value of a good app is that it enables you to hope for the best but prepare for the worst.

Many apps require the user to enter a constant expected rate of return. These apps are useless for stress-testing because they can’t account for the unpleasant possibility of negative returns early in retirement. Even apps that rely on historical back-testing may be overly optimistic, as they provide no insight into the impact of unprecedented market slumps.

The best apps for stress-testing tend to be those that employ some form of Monte Carlo simulation analysis — a retirement planning technique that provides probabilities of different outcomes. Through random sampling, Monte Carlo methodologies may produce scenario ranges that are both different and potentially worse than the historical record. Considering such scenarios may help you better evaluate preparedness and sustainability in tough times.

The need for improved simulation methodologies was highlighted in William Bernstein’s 1998 classic piece, “The Retirement Calculator from Hell,” and was validated during the two great bear markets in the 2000s. Today, nearly all of the highly regarded professional and consumer apps employ some form of Monte Carlo analysis.

3. Remaining-balance data

Most retirement spending calculators that employ Monte Carlo analysis can tell you the percentage of simulations in which your portfolio is sustainable or is depleted over the timeline you specify. Some calculators even attempt to determine the withdrawal rate at which there may be virtually no portfolio failures. While this “safe withdrawal rate” data is interesting, as a practical matter, planning your retirement spending strategy based on worst-case return scenarios may lead you to spend too little to enjoy your retirement.

Instead of focusing on such a withdrawal amount, more progressive apps include “remaining-balance” data for various simulation results (for example, median, bottom 1%, 5%, 10%, etc.) at various increments across a specified timeline. This output helps you more tangibly determine how long your nest egg may last. It can also help you make better decisions regarding withdrawal amounts.

Simply put, presenting this remaining-balance data allows the app user to more clearly balance the risk of running out of money against the risk of not spending as much as you could have. It’s valuable to understand the effects of how much you spend in retirement on both portfolio sustainability and the remaining balance that you eventually leave behind.

At the end of the day, no retirement calculator app is a crystal ball. However, one that allows you to realistically model your nest egg, test how your savings may hold up under adverse conditions, and is able to illustrate how long your money may last, can be a valuable planning tool.

J.R. Robinson is the founder of Financial Planning Hawaii and the co-founder of Nest Egg Guru.