Retirement evokes images of lounging on a beach, catching early dinners and, most importantly, never having to deal with your ugly morning commute ever again. But before you start fantasizing about that light at the end of the tunnel of your work life, financial experts say you need to get real about preparing for it.

No matter what stage of your life you’re in, there are crucial steps you need to be taking to make sure those dreams of a work-free life — while keeping the lifestyle you’re accustomed to — are a reality. Here’s what you need to know about getting ready for retirement in the decades to come.

In Your 20s

Experts say: Stash away about 8-12% of your salary; Focus on your 401k to reduce your taxable income; Roth IRAs are a good option for diversifying investments

It might seem a bit early to start thinking about no longer working when you are just starting off in your field, but experts say that this decade could be one of the most important times to start saving for retirement.

“The greatest asset you have [in your 20s] is time,” says Chris Heerlein, retirement coach, partner at REAP Financial LLC and author of Money Won’t Buy Happiness – But Time to Find It. “You have a lot more time for your investments to compound, and to let things recover [if there is market volatility].”

There are several go-to options when choosing a vehicle for your retirement savings. Some of the most common are 401(k) or 403(b) plans. According to Neal Ringquist, executive vice president of Sales and Marketing for Retirement Clearinghouse, these types of accounts allow you to contribute pre-tax dollars to your retirement account; that money is then invested. “There are two benefits,” he says. “One, it allows you to reduce your taxable income, and it allows those dollars to grow tax free.” (Money is taxed as ordinary income once you start getting distributions at retirement-age.) “Certainly do not leave any 401(k) match on the table,” he notes, adding that it is essentially an easy way to increase your account balance.

100 - your age = the percentage of your investments that should be in riskier asset classes (like stocks).

Get the better newsletter. This site is protected by recaptcha

Roth IRAs are another option, he notes. Contributions to these accounts go in post-tax, Ringquist says, and are allowed to grow tax free. If funds are withdrawn post-retirement, you won’t pay additional taxes on the funds. (You’re also permitted to withdraw your contributions to a Roth IRA before retirement without a penalty, unlike a 401(k). Note that you can’t withdraw the account’s investment earnings before retirement sans penalty.) Having a mix of retirement accounts comes in handy in the future, Ringquist notes, because it creates flexibility about where your income comes from while in retirement — and can come in handy when you’re trying to avoid getting thrown into a higher tax bracket. “That flexibility is enormously valuable,” he says.

Ringquist says trying to stash away about 8-12% of your salary is a good benchmark to hit. Confused about where your money should be going to work? Heerlein provides a good rule of thumb: take the number 100, and subtract your age from it. The number you get is the percentage of your investments that should be in riskier asset classes, like stocks. The remainder should go toward more conservative investments. (Meaning, the older you get, the more conservative your investments should get.)

In Your 30s/40s

Experts say: Resist the urge to increase your cost of living as your salary increases; Be strategic about other investments (never dip into your 401k to buy a home or send kids to college); Aim to hit the maximum contribution in your retirement accounts

As you’re potentially settling down and starting a family, your retirement savings may take a backseat due to the many competing goals in your life, says Kent Smetters, Professor of Business Economics & Public Policy at The Wharton School. When it comes to purchasing real estate, Smetters recommends thinking long and hard. “In general, only buy a home if you really have to,” he says. “In your 30s, you want to remain mobile. We set really high expectations for ourselves. I would recommend only buying a home [in your 30s] if you know for sure that you’re going to be in that area in the long term.”

If you do opt to buy, he notes you should absolutely have realistic parameters — don’t buy more than you can afford and avoid overpriced neighborhoods. (Basically, don’t try to keep up with the Joneses.)

Smetters highlights that you should absolutely resist the temptation to raid your 401(k) to help cobble together a down payment for a home. “In the short term, you can get yourself in a lot of trouble,” he says. If for example, you are laid off or leave your job, you may be required to repay 401(k) borrowings within 30 to 60 days. What’s more, when you take money out of your retirement accounts, your money is no longer growing via investments. “It’s very hard to make that up over time,” Smetters says. “You can always borrow for a house, but you can’t really borrow for retirement.” (Ringquist says “leakage”—when people cash out of their accounts or take loans from their retirement savings — costs workers about 25 percent of what is in their accounts over time.)