Investing in the stock market is a great way to build a nest egg for retirement. Investors are always looking for stocks that can grow their money over the long term, and Hubbell (HUBB 0.93%) and Tesla (TSLA 4.96%) are two that are worth a look now.

Bird's nest with $100 bills inside.

Image source: Getty Images.

Hubbell

Hubbell is a company that long-term investors should love: It has a profitable niche market, an excellent track record of success, and is relatively unknown, giving the stock room to run up.

The company makes electrical equipment and parts for a variety of applications and industries. However, what has excited investors most is its focus on grid modernization. The electric grid will need updating as the world moves toward electric vehicles (EVs), smart cities, and renewable energy. Indeed, some parts of the grid are over a century old. 

With so much spending on the horizon, Wall Street sees blue skies ahead for Hubbell. Analysts expect the company's sales to grow 8% this year and 4% in 2024. Similarly, earnings are expected to surge 19% in 2023 and 10% the following year.

What's more, Hubbell's stock remains reasonably valued. Shares trade at a price-to-earnings multiple of 24, which is only slightly above the current S&P 500 multiple of 22. 

Owning Hubbell isn't without risk. Yet, with its diversified end markets and the coming investments in grid infrastructure, Hubbell looks like a smart way to invest.

Tesla

Growing an investment portfolio means taking some risk -- and that's where Tesla fits in. It's got risk and big reward potential. Tesla's overall financial condition has improved tremendously from five years ago, but it remains a volatile stock.

Its beta -- a measure of stock price volatility -- is 2.01. That means Tesla is more than twice as volatile as the overall S&P 500. And while high volatility doesn't make a stock a poor investment (Tesla has outperformed the S&P 500 by 10x over the past five years), it can lead to something else investors might want to avoid: sleepless nights.

But if you're OK with volatility, owning shares of Tesla remains an excellent way for long-term investors to take part in one of the most significant secular trends of our time: the electrification of the automotive industry.

EVs are far more efficient in transporting people and goods than internal combustion engines. Because of this, along with government mandates and changing consumer tastes, the International Energy Agency predicts 60% of global vehicle sales will be EVs by 2030. To meet this demand, Tesla is ramping up production of its EVs. Which, in turn, is lifting its overall revenue. Wall Street expects Tesla to grow sales by 22% this year and 28% the next.

Nevertheless, owning shares of Tesla is like riding a roller coaster. Concerns over declining automotive gross margins have pushed the stock 25% off its recent high, even though shares are still up 31% year to date.

But I'm comfortable that as the EV revolution rolls on, Tesla will continue to lead the way. For long-term investors who want to ride in the vanguard, owning Tesla shares is a great way to do it.