You don't necessarily have to earn a lot of money to retire with a lot.
Ending up rich starts with paying yourself first, says Tony Robbins, a self-made millionaire and the best-selling author of "Money: Master the Game." That means that, whenever you earn money, you set aside a portion for your future self by putting it in a retirement account, where it can grow over time.
Almost anyone can pay themselves first, says Robbins, regardless of the size of their salary. To drive that point home, he gives the example of former UPS employee Theodore Johnson, who retired in 1952.
One of Johnson's mentors advised him to save and invest 20 percent of his income over the course of his career so that it would compound over time, Robbins tells CNBC Make It. Johnson protested: "I can't live on 20 percent less income," he said. But his mentor assured him he could. Over time, as saving that extra money became a habit, he'd learn to live without it.
Johnson agreed, and after decades of careful management, he ended up retiring with $71 million, as the New York Times reported in 1991.
Johnson is a bit of a special case. He also made other smart investments, including buying as much of the company's stock as he could, the Times reports. Plus, his final salary of $14,000 — which he earned after working his way up at UPS to vice president for industrial relations — would today be worth about $130,000.
Still, Robbins' point stands: Consistently setting aside money early on can pay huge dividends down the line. No matter the size of your paycheck, it makes sense to save and invest at least a portion of it every month. Even if you're only contributing a small percentage of your income to a retirement account, it's better to start small than not start at all.
Bestselling author and wealth manager David Bach agrees: If you want to retire rich, he says, start by putting your money to work, and work your way up to saving 10-20 percent of your pretax income in a tax-advantaged retirement account. Saving that much may sound daunting, but it'll be easier to do if you make it automatic — meaning that you have your contributions automatically taken out of your paycheck and sent straight to your retirement account.
Say you earn $50,000 a year, which is fairly typical, since the median U.S. household income is $61,372. Setting aside 10 percent of that would mean $5,000 in savings per year. "Now, if you hadn't put anything aside over the course of the year but instead waited until December to come up with this much money, how likely is it that you'd have $5,000 sitting around somewhere? Not very," Bach writes in "The Automatic Millionaire."
"But when you pay yourself first, you don't wait. The 10 percent is taken out of your paycheck and automatically invested for you before you ever see it."
And that $5,000 a year can really add up over time, thanks to compound interest, which causes your wealth to snowball. If you invest $5,000 a year for 35 years in the stock market and earn an annual return of 7 percent, for example, you'd have more than $750,000. Over 40 years, with an annual return of 7 percent, you'd have over $1 million.
The sooner you start investing, the better off you'll be.
To show just how advantageous it is to start saving and investing early on, personal finance site NerdWallet created a chart showing the percentage of each twice-a-month paycheck you'd need to set aside to have $2 million saved by the time you're 67, assuming two different starting points: age 22 and age 30.
The chart assumes you start with zero dollars invested. It also assumes a 6 percent average annual investment return and various annual salaries.
The 22-year-old has just an eight-year head start on the 30-year-old, but that makes a significant difference in how much is needed to save per paycheck. Scroll over the bars to see the exact numbers.
While being smart with a relatively modest salary can help you end up rich, a big salary doesn't guarantee wealth. Consider the celebrities who have made millions but lost it all, says Robbins: "You can look at some of the greatest athletes in the world, some of the greatest actors and actresses that have spent more money than you can imagine."
No matter what you make, they key is to consistently pay yourself first and "gradually build," says Robbins.
"Most people are thinking, I'm going to get this big hit; I'm going to make a ton of money; I'm going to have this home run and then I'm going to be financially free. But even the people that make those home runs don't always stay financially free."
Here's the bottom line, he says: "Anybody can get rich." The question is, "Can you stay rich?"
Like this story? Subscribe to CNBC Make It on YouTube!