Almost everyone wants to build a nice retirement nest egg. But doing so is easier said than done. Projections, pie charts, and professional guidance all seem to be key parts of the recurring process, but putting these components together can get complicated as well as time-consuming. Ugh.

You don't have to start your retirement fund journey with all of these resources, though. There's one simple formula that will get you started on the path to becoming a millionaire that you can use for the bulk of your working years. That is, set aside 15% of your annual salary in a tax-deferring retirement account, and invest it in an S&P 500 (^GSPC 0.02%) index fund. That's it.

Person at a kitchen table looking at papers and holding a mobile device.

Image source: Getty Images.

Keep it simple and watch the magic happen

Sure, it's more of a rule of thumb than an ironclad certainty. For some people, the number is closer to 10%. For others, it's closer to 20%. For most folks, though, saving 15% of their yearly pre-tax earnings will allow them to build a seven-figure portfolio capable of funding their current lifestyle once they're no longer working.

Don't believe it? Keep reading, and see if you see yourself in either of the scenarios below. (Spoiler alert: You probably will.)

Let's use a 25-year-old named Pat as our first hypothetical example. Pat's 25 years old and just started a catering business that will earn on the order of $50,000 per year. Pat wants to keep his operation small and flexible, however, and doesn't plan to hire employees. As such, Pat doesn't expect to ever really earn more than $50,000 per year.

The thing is, that'll be enough. By taking 15%, or $7,500, of that annual income and investing it in an S&P 500 index fund earning an average of around 10% per year, Pat should be sitting on a stash worth a whopping $3.3 million at 65.

Chart showing the growth of annual $7,500 investments in an S&P 500 index fund.

Data source: Calculator.net. Chart by author.

Notice how the bulk of that fortune took shape in the last one-third of the 40-year stretch. That's when the power of compounding, or earning money on your previous returns, really kicks into high gear... when there's a fair amount of money in the IRA to be put to work.

As the old adage goes, though, there's more than one way to skin a cat. Just ask Kris.

Kris went straight into the workforce after high school, taking several different restaurant server jobs. Kris had a dream of being a lawyer, though, and so returned to college and at 35 years of age has just completed law school. Kris has already landed a job at a local law office with a starting salary of $50,000 per year but expects to be making much more money in the future. By retirement, Kris expects to be earning around $150,000 per year; that would only require annual raises on the order of 4%.

Will working 10 fewer years than Pat -- and missing out on a full 40 years' worth of compounded gains -- be a problem for Kris? Kris's initial annual contribution of $7,500 to her retirement fund will grow every year to reach $22,500 in her 30th and final year of saving, translating into about $400,000 worth of contributions. Earning 10% per year, though, Kris will end up with nearly a $1.6 million nest egg.

Chart of annually increased initial investment of $7,500 in an S&P 500 index fund over the course of 30 years.

Data source: Bankrate and author. Chart by author.

While Kris didn't see nearly as much benefit from compounding as Pat did, notice how (like Pat) the bulk of the growth in the portfolio also materialized in the last one-third of the 30-year savings period.

That's an important reality to draw out here.

See, most ordinary people who become rich don't do so by working a job. Rather, they do so by making their money work for them. It just takes time to accumulate enough capital to start making any real money in the stock market. Once your retirement fund reaches a tipping point nearer the end of your working years than the beginning of them, it's not unusual for it to gain more than you earn at your job in any given year. The key is just continuing to sock away as much as you can as soon as you can... even when it feels like your savings just aren't growing enough to matter.

Details matter, but the broad brush strokes matter more

There's some proverbial fine print to these bigger-picture scenarios. Chief among these footnotes is the likelihood of being able to put 15% of your annual income into a retirement account. It's not easy to do when you're earning $50,000 per year. It's even tougher to do when you're making less.

Even so, you can become a millionaire just by investing as little as $2,500 per year in an S&P 500 index fund for forty years. Many people can scrape together that much, and it's certainly well worth the sacrifice in the end.

Another important piece of fine print: A million dollars in today's money won't mean nearly as much 30 or 40 years from now. On the flipside, typical salaries will be well above $50,000 per year by then, and even before then. That's why you should aim to save a percentage of your annual income rather than a fixed dollar amount. That approach ensures you're growing your annual contribution in step with inflation.

Yet another matter to consider: As an employee, you won't necessarily be eligible to deposit 15% of your yearly wages into a traditional or Roth IRA. Those contribution limits currently stand at $7,500 per year if you're 50 years old or older, but only $6,500 per year if you're under the age of 50. You may need to participate in a company-sponsored plan to save this much, or in a case like Tim's, set up your own self-employment retirement account. Both allow for larger yearly contributions.

Whatever the case, the big takeaway here is just starting somewhere with some kind of plan. Socking away 15% of your wages is a simple and effective approach anyone can start with.