You don't need a six-figure salary or a sudden windfall to retire a millionaire. Ordinary people do it all the time. You just need to prioritize retirement savings and choose your investments strategically.

Everyone's path to retirement riches looks a little different, but there are a few things most millionaire retirees did with their 401(k)s to set themselves up for a bright future.

Senior couple on sailboat looking at the horizon.

Image source: Getty Images.

1. They started saving early

Making regular contributions to your retirement account from a young age makes saving for retirement much easier. Your earlier contributions have more years to grow than your later contributions, so they usually end up being worth more in the end. That means you have more investment earnings to fall back on and you don't need to contribute as much of your own money toward retirement.

If your goal is to save $1 million and retire by 65, you'd only need to set aside about $381 per month if you began saving at 25 and earned a 7% average annual rate of return. If you waited just one year to start saving, you'd now have to set aside about $410 per month to have enough, assuming you earned the same average annual rate of return. And if you waited until you were 35 to start saving, you'd need to save almost $820 per month to reach your goal because you'd have fewer investment earnings to help you. 

While the above example shows the value in starting early, it doesn't mean you can't retire a millionaire if you got a late start. Just begin from where you are right now and do your best to make regular contributions going forward. 

2. They got their full employer match

Employers sometimes match a portion of their employees' 401(k) contributions to help them save for retirement. But you only get it if you put money into your account first.

There might be times when you're unable to claim your full match because you're struggling financially, but whenever you can, prioritize getting that match. Check with your company's HR department if you're unsure whether your company offers a match or how its matching system works.

You should also ask about the vesting schedule, especially if you're planning to leave the company in the near future. If you leave before you're fully vested in the plan, you will forfeit some or all of your employer match. You shouldn't have to worry about this if you've already been with your company for six or more years, but if not, consider sticking it out a little longer so you can keep more of your employer's contributions to your 401(k).

3. They kept their fees low

Fees are an inevitable part of investing. You'll never be able to avoid them completely, but you can minimize how much of your profits they eat up by choosing your investments carefully. Most employers offer a selection of mutual funds for 401(k) participants to invest in, but not all mutual funds are the same.

Actively managed funds require fund managers to choose which investments are part of the fund and to buy and sell accordingly. Index funds mimic a market index, like the S&P 500, so there's less buying and selling and, by extension, less work for fund managers to do. That makes these funds more affordable than actively managed funds.

It's up to you to decide which investments are right for you based on your risk tolerance, but you should weigh cost as well and try to keep your fees as low as possible. Your prospectus should tell you what you're paying annually in fees. It's often written as a percentage of your assets. You want to keep this as low as possible so more of your investment earnings stay in your account instead of going to someone else.

4. They left their money alone until retirement

It's tempting to withdraw money from your 401(k) when you're in a pinch, but doing so can set your retirement savings back considerably because you're losing out on years of investment growth. You'll also have to pay taxes on your withdrawal, plus a 10% early withdrawal penalty if you're under 59 1/2.

You should explore all other options before taking money out of your retirement account and understand the consequences of making an early withdrawal if you have no other choice. You will have to save more money each month going forward if you hope to retire when you originally planned.

Some 401(k)s allow loans, which give you the opportunity to borrow money from your retirement account without paying taxes or penalties if you pay back what you took out plus interest. This may be better than an early withdrawal, but it can still put you behind your savings goal. It's best to create a new retirement plan to use going forward to be safe.

A 401(k) is a retirement savings tool, but it can't do all the work for you. You have to make smart decisions and understand how to best leverage the benefits your 401(k) offers if you want a shot at retiring a millionaire. Sticking to the above tips as much as possible is a good place to start.