The ups and downs in the stock market have dealt a blow to most people's retirement accounts.

But while short-term fluctuations may be stressful, they won't necessarily derail long-terms goals. Still, the recent swings can be a reality check: What happens if stocks stay soft for a long time? On the flip side, what if there's a sustained rally? When setting up a retirement plan, it's a good idea to factor in slumps. The online Retirement Planning Calculator from BankingMyWay.com can help with that.

The calculator estimates how long retirement savings will support you based on information such as current age, savings and retirement date. The calculator also asks you to estimate the rate of returns expected in the years leading up to and during retirement. Even small changes in those estimated annual returns will have a major impact on the success of your retirement plan.

When you first set up your retirement plan, you probably estimated an 8% average rate of return on your investments -- that's the average yearly return (excluding dividends) of the S&P 500 dating back to the 1950s. But what if your average rate is closer to 10%? What if it's closer to 6%? The calculator can help lay out these scenarios.

Say your retirement accounts are now worth around $250,000. You're 40 years old, earning $60,000 a year and putting 10% of your income in a retirement account. You plan on retiring at 67 and figure to live off 80% of your income at retirement. (The calculator assumes your salary will increase by 4% a year until you retire.) With an estimated 8% return in the years leading up to retirement and a slightly more conservative 6% return during retirement, your retirement dollars would have you covered until age 96. (Investors' annual returns typically drop off during retirement as they shift more money from stocks to the relative safety of bonds.)

If you liked this article you might like

Managing Your Money: Do You Have The Skills?

Do You Have The Skills to Manage Your Money?

Do You Have The Skills to Manage Your Money?

Ways to Make Cash When There Are No Jobs

Ways to Make Cash When There Are No Jobs

Ways to Make Cash When There Are No Jobs

5 Skills to Learn if You're Looking for a Job