Often, the stock that soars or plummets overnight attracts the headlines -- and that could make some of us think twice before investing in the market. But the good news is, if you invest for the long term, you're more likely to grow your money over time than to win or lose everything in a period of hours.

We often talk about safe stocks and higher-risk growth stocks, and if you're a cautious investor, you'll probably favor the former. That's an excellent idea. But here's some more good news for you: Right now, you can invest in two companies that are considered safe thanks to their strong earnings over time and the much-needed products they sell -- and at the same time, their stocks offer the potential for growth too. So, you don't have to be a big risk-taker to invest and score wins over the long haul.

An investor smiles while talking on the phone.

Image source: Getty Images.

1. Eli Lilly

Eli Lilly (LLY 1.19%) may be a big pharma company, but it's looking like a high-growth player with a lineup of products driving double-digit percentage revenue growth. In the third quarter, revenue soared 37% year over year to more than $9 billion.

What's positive is much of this growth is driven by new or relatively new products that won't face losses of exclusivity any time soon -- so we can count on their ability to push revenue higher for quite some time. In Q3, new products accounted for $1.44 billion of sales, and growth products, most of which won't lose patent protection in the near future, represented nearly $5 billion in revenue.

Even better, Lilly just won regulatory approval for a drug that could help it win in the multibillion-dollar weight-loss market. The Food and Drug Administration gave the nod to Zepbound for chronic weight management, where it will compete against Novo Nordisk's blockbuster Wegovy. Zepbound is the same molecule as Lilly's type 2 diabetes drug, Mounjaro -- which was already one of the blockbusters driving the company's growth.

Lilly reported a third-quarter loss, but one particular thing contributing to this loss was actually something that should boost earnings over time: its acquisitions of Dice Therapeutics, Versanis Bio, and Emergence Therapeutics.

So, it's fair to say Lilly has the revenue drivers to make it look a lot like a growth stock right now. But it offers you the safety of dividend growth and steady earnings over time.

2. Johnson & Johnson

You probably know Johnson & Johnson (JNJ -0.46%) well thanks to products like Tylenol and Band-Aid brand bandages. But these actually haven't been the company's main growth drivers. In fact, since the consumer health unit that included them was weighing on its growth, J&J spun it off into a separate business this year.

Now, J&J is focusing all of its efforts on its higher-growth pharmaceuticals and medtech businesses. With this renewed focus, the company has a stronger chance of maximizing the revenue potential of each.

It's off to a good start. The spinoff left J&J with more than $13 billion in proceeds that it could use to boost its pipeline programs or make acquisitions. Meanwhile, J&J also is working toward its goal of lifting its pharmaceutical revenues by about 10% from 2022's figure to $57 billion by 2025. It can count on help from top-seller Stelara since that blockbuster immunology drug won't face biosimilar competition until that year.

As for medtech, J&J is streamlining its orthopedics business by exiting certain markets and ending certain products in order to boost margins over time. Meanwhile, also in medtech, J&J's recent acquisition of heart pump maker Abiomed and new approvals -- such as a nod for J&J's atrial fibrillation ablation products to be used without fluoroscopy, which removes radiation exposure -- should boost growth.

Finally, you'll love J&J's track record of more than 50 consecutive years of dividend hikes. So, with J&J, you'll get the safety of passive income along with a whole new growth story that's just getting started.