Saving for retirement is often one of the biggest financial challenges in life because it’s a far-away goal requiring a long-term plan. It’s easy to lose sight of the end goal—financial independence and security later in life—when shorter-term and more immediate financial challenges demand attention now, like paying off student debt, saving for a house, or starting a family.

To help achieve a healthy retirement nest egg, avoid these six retirement planning mistakes.

Waiting too long to start

This is where the saving-enough-for-retirement struggle begins. You may start your career in your 20s, but if you don’t also begin contributing to a retirement plan early on, you’ll approach your golden years needing to possibly make serious lifestyle compromises. By not saving and investing early, you’re losing out on the magic of compounding interest and market growth. The money you invest later in life won’t work as hard for you as the money you invest early on. It can be easy to tell yourself you’ll simply save more later in life when you make more money, but to make up for the lost market growth and compound interest, you would need to invest a far higher percentage of your income. If you’re not willing to buckle down and save 5% of your income now, will you be willing to save 30% or more later?

Start with a percentage your budget can afford while still paying other fixed financial obligations (rent, student loans, car loan, etc.). That may be 1% of your income, but that’s better than nothing. From there, aim to consistently contribute to a retirement investment plan with the goal of contributing 10–15% of income per year.

Not starting with a plan

Closing your eyes and guessing how much you need to invest each year for retirement is a plan for disappointment. Instead, use the tools and resources at your credit union, online, and at your employer(s) to build and continually adjust a personalized retirement plan. The first step will be to run a basic retirement calculation when you initially set up a retirement account. This will tell you, by taking into consideration your current income, inflation, taxes, expected future cost of living, and investment performance, how much you need to contribute each year to stay on track. Review this plan at least once a year.

Leaving the market after a slump

Investing for retirement is a long-term game, which means you shouldn’t make emotional decisions about those investments based on what the stock market looks like today. Building your retirement investment plan solely on the stock market is shortsighted. For most people, a hands-off, automated, and diversified investing plan will serve them best. Not only because it doesn’t require deep financial and investing knowledge, but also because it allows you to ride out the usual fluctuations in the market without disrupting your long-term plan. A smart approach could be to invest in a diversified portfolio with professional guidance that includes selecting an asset allocation mutual fund based on your risk tolerance.

Not making the most of tax-advantaged accounts

Tax-advantaged accounts—401(k)s and deductible IRAs—allow your money to grow faster because taxes aren’t deducted until you begin making withdrawals. They also lower your current taxable income and obligation. Making the most of these accounts also means taking advantage of your employer’s matching contribution program, if they have one. If you can, contribute the maximum matching amount—if they offer to match up to 5%, make sure you’re working hard to contribute 5% to take advantage of that free money.

Buying too much of your company’s stock

Sometimes your employer’s stock will be an investment choice in your 401(k). To minimize your risk and maintain a balanced portfolio, consider keeping your allocation to no more than 10 percent. Your salary is already tied to your company’s success; you may not want too large a portion of your financial future to be similarly tied.

Quitting your job before reaching full vestment

Those matching 401(k) contributions, profit-sharing, or stock options from your employer you were told to take advantage of? They often come with strings attached, usually in the form of a vesting schedule. Vestment is how much ownership you have in the funds or stocks your employer matched. You usually won’t have full ownership over them until after a set period of time working for the company. If you leave the company before then, you’ll forfeit a portion of that money (you always maintain ownership of money you contributed).

Before you leave a job, investigate your company’s vesting policy to decide if it’s truly better to leave some of that free money on the table. If you’re close to the full vestment deadline, see if you can stick it out until then.

If you avoid these mistakes while planning and investing for retirement, you should be able to arrive at retirement prepared for financial independence and peace of mind.