What is the link between the theoretical physicist Albert Einstein and investing? At first blush, newer investors may not be aware there was such a link between the two topics of discussion.

Einstein is sometimes attributed with saying: "Compound interest is the eighth wonder of the world. He who understands it, earns it ... He who doesn't, pays it." Even if he didn't say it, there's no arguing with the concept. Investing as little as $300 a month into the stock market at its historical annual total return rate of 10% for 35 years is enough to start from nothing and become a millionaire. Here are three stocks to consider steadily investing $100 a month into that could put you well on your way to becoming a millionaire in just over three decades.

A businessperson works on their laptop.

Image source: Getty Images.

1. AbbVie: A Dividend King with the potential for a promising future

AbbVie (ABBV 1.05%) is best known for its smash-hit immunology therapy Humira. Despite the slew of biosimilar competition that the medicine is facing in 2023, the consensus is that Humira will still haul in $13.5 billion in revenue for the pharmaceutical company for the year. With 10 other products that are set to generate at least $1 billion each in sales, it's safe to say that AbbVie's product portfolio is robust.

The company's commitment to innovation has paid off for shareholders over the past five years. A $10,000 investment in the stock would now be valued at $18,000 with dividends reinvested-- a 12% compound annual growth rate. For context, that's a bit more than the $17,000 that an investment in the S&P 500 index would be worth today with dividends reinvested. 

And given that AbbVie spent $7.1 billion on research and development to advance clinical trials for more than 90 indications in 2022, the years ahead could be just as bright. If this wasn't enough, the company is also a Dividend King with a well-covered 4.4% dividend yield -- much more than the S&P 500 index's 1.6% yield.

Income investors seeking moderate capital appreciation as well can add shares of AbbVie at a forward price-to-earnings (P/E) ratio of 12.2. That's just below the drug manufacturers industry average forward P/E ratio of about 12.9. In my opinion, that makes the stock a solid value at the current price of about $137.

2. Air Products & Chemicals: Selling inputs into products we can't live without

You may not realize it, but Air Products & Chemicals' (APD 0.55%) gases play a key role as inputs into a variety of commonly used products, such as beer, gasoline, medicine, and smartphones/tablets/laptops. Because of its critical nature to our everyday lives, a $10,000 investment in this company made just five years ago would now be worth $19,000 with dividends reinvested.

Looking ahead, the demand for Air Products & Chemicals' industrial gases, such as hydrogen, oxygen, and carbon dioxide, is sure to grow along with the demand for consumer products. This is why analysts believe the company's earnings will rise by 9.4% annually over the next five years. Growth in profits and a manageable dividend payout ratio are the reasons for my confidence that Air Products & Chemicals can build on its 41-year dividend growth streak.

Investors can scoop up shares of the stock and its 2.6% dividend yield at a forward P/E ratio of 22. While this is a significant premium to the specialty chemicals industry average forward P/E ratio of about 16, it's arguably justified by Air Products & Chemicals' superb quality as a business.

3. PepsiCo: A juggernaut of the consumer staples sector

PepsiCo (PEP 1.18%) is arguably the most well-balanced company within the consumer staples sector. Unlike Coca-Cola (KO 0.78%), which focuses purely on beverages, the former's product portfolio includes numerous billion-dollar brands across both the beverage and food and snack categories. PepsiCo's most successful brands include the sports drink Gatorade, Lay's potato chips, and Aquafina bottled water.

This explains how a $10,000 investment made in the stock five years ago would now be worth $21,000 with dividends reinvested. As the company completes bolt-on acquisitions and the global population continues to increase each year, its revenue and earnings should also grow. Analysts believe that PepsiCo's earnings will climb by 7.8% each year through the next five years. 

The company's steady earnings growth potential and a sustainable dividend payout ratio are why I am confident that it can extend its status as a Dividend King in the years to come. Dividend growth investors can pick up shares of PepsiCo and its 2.8% dividend yield at a forward P/E ratio of 23. This is only slightly above the non-alcoholic beverages industry average forward P/E ratio of 21.9.