We'd all like to be millionaires, and more people than you might think have already achieved that status. Fidelity Investments should know, as it boasts more than $11 trillion in assets under management and more than 43 million investors served -- many via 401(k) accounts. According to Fidelity, there were 378,000 millionaires with 401(k) accounts in the second quarter of 2023, up 10% from the year-earlier period. (Fidelity also reported nearly 350,000 millionaires with IRA accounts, up 13%.)

People attain millionaire status in various ways. Some inherit big bucks from wealthy relations. Some (but very few) hit it big in Las Vegas. Some start companies and sell them to bigger companies. But a much more common way to get wealthy is to do so via investing in the stock market over a long period -- perhaps in a 401(k) account.

Someone is tending plants in a greenhouse, and smiling.

Image source: Getty Images.

Here are three ways that people have grown their 401(k) accounts to $1 million -- or more.

1. Contributing regularly and investing effectively

This first "secret" shouldn't be very secret -- simply put, you need to be socking money away regularly in your 401(k), and a lot of it, too. Fortunately, 401(k) plans make that kind of easy. You get to decide how much of each paycheck to send to your account, and the contribution limits for 401(k)s are fairly high -- for 2024, the limit is $23,000, plus an additional $7,500 "catch-up" contribution for those 50 or older.

The default contribution percentage for your plan may be quite low, so look into raising it to a meaningful amount. One rule of thumb has been to sock away 10% of your income, but that's not enough for some people -- especially if they're starting later. If your company offers to match part of your contribution, as many do, be sure to at least contribute enough to max out that match. That's free money, after all.

To invest effectively, consider having most or all of your long-term money (that which you won't need for at least five, if not 10, years) in stocks -- perhaps via a low-fee, broad-market index fund or two. These days many 401(k) plans offer index funds among the choices they offer participants. You may aim for higher returns with other funds, but don't discount index funds, as they can really be all you need.

2. Living below your means

Next, you'll have a hard time achieving millionaire status if you're living beyond your means and racking up debt. Resist every urge to overspend, and remember that many millionaires are leading ordinary lives, in modest homes, driving 10-year-old cars. And lots of seemingly wealthy people in fancy homes may be mortgaged to the hilt and deep in debt.

It can be helpful to set up a budget to keep you on the road to riches. And if you're having trouble paying for what you need to pay for and what you want to pay for, consider taking on a side gig for a while. That can be a powerful way to turbocharge your saving and investing, too.

3. Being determined and patient

Probably the biggest secret to amassing $1 million or more via stock market investing is this: You'll need to go about it with great determination and patience, and that's harder than it might seem.

After a few years, for example, you might be thinking about buying a home and might want to cash out your 401(k) early. Don't do it! You'll likely not only face taxes and early withdrawal penalties, but you'll also interrupt the growth of your money.

Alternatively, you might just get discouraged and cut back your investments -- or just stop -- if your money isn't growing rapidly. Remember that the stock market doesn't go up by double digits every year. In some years, it even retreats. But overall, it has always recovered and gone on to new highs.

Check out the table below. The middle column shows how your money can grow if you start saving and investing $10,000 annually (that's about $833 per month) starting now. The right column shows how it will grow if you start a decade later and invest twice as much -- about $1,667 per month. You can see that you'll end up with more if you start early and invest less! Your earliest invested dollars are your most powerful ones, as they have the most time to grow.

Year

Total Savings: Investing $10,000 Annually Starting Now, Growing at 8%

Total Savings: Investing $20,000 Annually Starting in 10 Years, Growing at 8%

10

$156,455

$0

20

$494,229

$312,910

30

$1,223,459

$998,458

40

$2,797,810

$2,446,917

Calculations by author.

Don't forget the power of IRAs

While 401(k)s can be very powerful wealth builders, so can IRAs -- despite their having much lower contribution limits. Indeed, Warren Buffett's investing lieutenant Ted Weschler grew his own IRA to a value of more than $260 million! That's kind of extreme, but he did it in rather ordinary ways that we can emulate. So if you don't have a 401(k) to participate in, and even if you do, consider making good use of an IRA or two.

Whether you use 401(k)s, IRAs, regular taxable brokerage accounts, or some combination of them, be sure that you are saving and investing for retirement -- because Social Security, with its average annual benefit of less than $23,000, isn't going to be enough.