Personal finance can be overwhelming. There are so many steps, dos and don’ts, and behaviors to adopt. Once in a while it would be nice to have a fail-safe, simple solution to follow to make sure you have enough for retirement.

Maxing out your 401(k) is the single best way to save for retirement, lower your tax implications and spend less, all in one fell swoop.

Does it work for everyone? No. Like any “one size fits all” rule, there are those for whom it won’t fit. Some people don’t have access to a 401(k) (or its nonprofit sister, the 403(b). Some people want to spend too much in retirement to only save $18,000ish a year.

But for the vast majority of Americans who work in a job where they have access to a 401(k), maxing out this retirement savings vehicle makes a lot of sense.

Let’s look at the math.

The hypothetical

We’ll take a hypothetical saver, Meredith. Meredith is fresh out of college, and is 22 years old. She has a new job where she earns $40,000 a year. She has access to a 401(k) and health care benefits. Let’s say she lives in New Hampshire, like me (that means she has no state taxes — good for her).

If she’s paid biweekly, then she’ll bring home $1538.46 gross. Let’s subtract $317.26 for federal taxes, Social Security, and Medicaid, and $50 for subsidized health care premiums (for a single person, the average would be $41.19 a paycheck. I rounded to $50).

That means, after taxes, she’ll bring home $1171.20.

What if she opts in, all in, for her 401(k)? She contributes $692.31 per paycheck, which should be allowed by her company as it’s less than 50% of her gross pay.

Because she’s lowered her federal tax implications by such a large amount, she’ll owe $213.41 in taxes, $50 in health care, and bring home $582.74.

Yes, that is about half of what she was making. And for most people, living on roughly $1150 a month would be very difficult. But, what if she could swing it? She finds a room to rent with some friends, pays $300 in rent per month, drives her beater car, and makes it work.

Eventually, she and her boyfriend get married, he starts working, they get raises, and their income rises to $100,000 combined a year. Let’s say, for the sake of our hypothetical argument, that he never contributes a dime to a 401(k). Meredith works for 40 years, and never saves more than $18,000 a year in her 401(k) (for simplicity’s sake). Also, her employer never gives her any type of match. And she never saves in any other vehicle. But she faithfully maxes out her plan each year.

If she works for 40 years and retires at age 62, then with a return rate of 5%, she will have accumulated $2,283,115.73.

That gives her family over $90,000 a year in living expenses, more than enough to retire on, since they’ve only been living on about $60,000 a year after taxes.

If Meredith only works for 30 years, and retires at age 52, then with a 6% rate of return, she’ll have accumulated $1,508,430.19 in her plan.

If she and her husband withdraw 4% a year, they’ll have just over $60,000 to live on a year. After taxes, that will be $48,640 a year, which they could supplement with a part-time job, her husband’s income, or eventually, Social Security.

The reality

But let’s face it. Most 22-year-olds aren’t going to max out their 401(k) accounts. They’re making too little, have student loans to pay, and are not thinking 40 years into their futures.

They’re thinking about paying off their debt, saving for a house down payment, or buying a new car.

But what if we try another scenario? What if Meredith starts contributing just 10% of her salary to her 401(k), and then each year, as she gets a raise, she ups her contribution by 2%?

At age 62, with a 6% return rate, Meredith would have $1,1105,200 in her retirement portfolio.

That’s assuming she never contributes more than $18,000 and never receives an employee match.

That’s still over a million dollars Meredith will have in her retirement account.

What if her husband follows the same path? He begins his working career making $40,000 and saving 10%. Then he increases his contributions by 2% a year as he gets a raise. They’ve had to learn to live on even less, because their contributions are taken off the top of their paychecks.

But they’ll also have paid less in taxes and will have over $2 million in their retirement portfolios at age 62.

How millennials are disrupting the financial adviser industry

Let’s get real

OK, enough with the hypotheticals. Let’s take a real-life example. Abe and Sue, a couple who are now in their 60s, never contributed to 401(k)s during the majority of their working years (as a small-business owner, Abe had a SEP plan and Sue worked for the state and contributed to a pension). However, when Abe sold his pediatric practice a couple of years ago and became an employee for the first time, and Sue started running her own business, they finally began to fully max out their 401(k) accounts. While they have significant retirement savings (and pensions) already, let’s see what these contributions can do for them.

They each started maxing out their accounts at ages 62 and 63 (they’re a year apart). They’re saving the maximum, which is $18,500 a year each, plus the catch-up contribution, an extra $6,000 each, since they’re over the age of 50.

That’s $24,500 a year each.

Their taxable income is lowered by $49,000 a year, they’re spending $49,000 less a year, and they’re saving and investing $49,000.

In 10 years, with a 6% rate of return, they’ll have an extra… $672,519.32!

That is significant money. And because it’s automatically taken out of their paychecks, they don’t miss it. They’ve learned to live on less, get to watch their 401(k) accounts grow, and enjoy paying less taxes at tax time.

Read: Social Security: What to know, what to expect, how to make it better

The downsides

Like anything in life, a 401(k) has its downsides. First of all, the investment options available for employees are usually much worse than investment options you’d get on the open market. Fees are higher, which of course eat into your returns.

Search your plan for the S&P 500 index SPX, +0.29% fund option, if there is one, and put all your money there.

Isn’t that putting all your eggs in one basket? Well, no. It’s like putting all your eggs in 500 of the top, ever-rotating baskets. And usually, these index fund options have the lowest expense ratios.

Take powerhouse investing firm Principal, for example. They have a passively managed index fund in many 401(k) portfolios called the LargeCap S&P 500 index.

You’d pay 0.18% (18 basis points) in fees for that fund, which is by far the lowest expense ratio that Principal offers.

Some employers offer Vanguard funds, and as an independent contractor, you can set up an individual 401(k) account through Vanguard. Here’s a primer. VTSMX (Vanguard Total Stock Market Index Fund) VTSMX, -2.59% and VFINX (Vanguard 500 Index Fund) VFINX, +0.30% have expense ratios of 0.15% and 0.14%, respectively.

It’s VERY important to make sure that you’re invested in low-expense, passively managed funds in your 401(k). But keep it simple. Find the best index fund or exchange-traded fund offered, put your money there, and don’t mess with it too much.

Read: All the ways you can mess up your 401(k) — even if you max out your contributions

In a nutshell

If you’re floundering financially and just trying to get your feet under you, start contributing the minimum needed to get an employer match, if you work for a company that has a 401(k) or 403(b). Even if you have a huge amount of debt to pay off, the psychological implications of growing a nest egg are profound (read “The Richest Man in Babylon” for a vivid reminder of why).

This column originally ran on The Three Year Experiment blog and was adapted and published with permission.

Laurie writes The Three Year Experiment blog, and with her family has set out to double their net worth and move abroad in the next three years.