Save and Invest

Here's how much money to save if you want to retire 'rich,' according to wealth manager David Bach

Getting rich starts with paying yourself first, says self-made millionaire and wealth manager David Bach. In short, that means, "when you earn a dollar, the first person you pay is you," he writes in his bestselling book "The Automatic Millionaire."

More specifically, if you want to retire rich, he says, "save 15 percent to 20 percent of your pretax income in a tax-advantaged retirement account," such as a 401(k), 403(b) or IRA. If you want to be "rich enough to retire early," he adds, contribute 20 percent or more to a retirement savings account.

These percentages come from Bach's "pay yourself first formula," which he created to give you an idea of what your financial standing will look like depending on how much you save. Here's the full formula:

To be ...

Dead broke: "Don't pay yourself first," writes Bach. "Spend more than you make. Borrow money on credit cards and carry debt you can't pay off."

Poor: "Think about paying yourself first, but don't actually do it," he writes. "Spend everything you make each month and save nothing. Keep telling yourself, 'Someday … '"

Middle-class: Save 5 percent to 10 percent of your pretax income in a tax-advantaged retirement account.

Upper-middle-class: Save 10 percent to 15 percent of your pretax income in a tax-advantaged retirement account.

Rich: Save 15 percent to 20 percent of your pretax income in a tax-advantaged retirement account.

Rich enough to retire early : Save 20 percent or more of your pretax income in a tax-advantaged retirement account.

Keep in mind that "everyone's life is different," Bach writes, "but this should give you a benchmark to shoot for or plan around."

"When you earn a dollar, the first person you pay is you." -David Bach, bestselling author of 'The Automatic Millionaire'

Saving 10 to 15 percent of your income may sound daunting, but it'll be easier to do if you make it automatic — meaning, you have your contributions automatically taken out of your paycheck and sent straight to your retirement account.

Say you earn $50,000 a year. 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," says Bach.

"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. If you invest $5,000 a year for 35 years in an account that earns 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.

Keep in mind the contribution limits for tax-advantaged retirement accounts: In 2019, employees who participate in an employer sponsored 401(k) plan will be able to contribute as much as $19,000 per year. The limit on annual contributions to an IRA is $6,000.

Don't miss: Self-made millionaire: The 'one, proven, easy way to get rich'

Like this story? Subscribe to CNBC Make It on YouTube!