Adopting the habits and strategies of rich people can guide you toward wealth, as long as you’re willing to put in the work.

John, who runs the personal-finance blog ESI Money and doesn’t share his last name online, has spent the past few years interviewing millionaires. John was a business executive for 28 years before he retired at age 52 with a $3 million net worth.

John says there are three elements to getting rich: earning, saving, and investing. Now that he’s interviewed 150 millionaires, he’s figured out exactly what it takes to be successful at each step.

1. Increase your earning potential

Looking back, most millionaires realized that earning was more important than they originally thought, John found.

"It takes time and effort to make the big bucks, so the sooner you get started, the sooner you'll reap the benefits," John wrote. "This means considering both growing your career as well as developing a side hustle. Over time they will both increase and be what fuels strong net worth growth."

Many of the millionaires "started with very minimal paying jobs" and worked hard to develop the skills needed to increase their salary, John said. They also diversified their income, most commonly with investment dividends, side hustles, and income-producing real estate.

2. Control your spending

One of the most surprising patterns to John was that the vast majority of millionaires don't live by a budget.

But that doesn't mean they never did.

"Developing a spending self control is vital to becoming wealthy and a budget is the best tool for doing so," John wrote. "Even if it's just for the first few years of your financial journey, develop and live on a budget at least until you know you can manage your spending impulses."

Despite not determining their spending for the month or year, many of the millionaires still track where their money goes, John said. The point is to save and invest as much as possible, and you achieve that by keeping expenses and discretionary spending low.

Once you're spending less than you earn, saving automatically, and investing prudently, a self-control mechanism takes over and it's no longer necessary to budget every dollar.

3. Invest now

The math proves that time is on your side in investing.

"Sock away as much money as you can as early and as often as you can to get compounding working for you," John wrote.

He found that, like himself, millionaires overwhelmingly favor simple investments - like index funds, most commonly. Despite making their fair share of mistakes early on, most realized quickly that they aren't killer stock-pickers.

Index funds are a type of passive investment that exposes investors to a broad selection of stocks in order to diversify and ultimately minimize risk. They have low costs and regularly outperform actively managed funds. One of the easiest ways to invest in index funds is through your retirement accounts, such as a 401(k) or IRA.

"Over time you can keep at it or look to expanding into real estate depending on your goals and interests," John wrote. "After that, it's simply time. Give it long enough and one day you wake up wealthy."