There's something uniquely satisfying about owning shares of a company that'll continue to be relevant for decades. Whereas other investments might keep you up at night, forever stocks are stable enough and dish out enough cash to your account from their dividends that they might even help you to sleep soundly.

If you're in the market for that kind of stock -- and you probably should be -- here's a pair of companies you should know about. 

Person sitting in a cafe and reading papers while working on a laptop.

Image source: Getty Images.

1. Johnson & Johnson

If a financial terms dictionary provided examples along with its definitions, "forever stock" would list Johnson & Johnson (JNJ 1.49%) as the first example. The healthcare juggernaut sells everything from coronavirus vaccines to prescription drugs to operating room tools to shampoo and Tylenol, and it's done so profitably each year for decades on end, without fail. Its growth engine uses a constant drip of research and development (R&D) spending, which totaled more than $15.3 billion in 2022, to make new prescription drugs and medical devices, not to mention lower-margin consumer health products. If its annual net income of $17.9 billion doesn't say enough, that growth engine has been great for shareholders over the years -- and it might be getting even better.

If you bought $5,000 of J&J stock in late February of 2013 and held it until now, you'd have realized a total return of around $13,570 between its share price appreciation and constantly rising dividend payouts. Right now its forward dividend yield is 2.8%, but it could rise soon, and its dividend hikes could also start to be a bit larger.

The reason for these potential changes is that the company is planning on spinning off its consumer health products into a new entity called Kenvue sometime late in 2023. The idea is that the $15 billion in consumer health product sales it realized in 2022 won't be missed if the pharmaceutical and medical device segments can grow even faster with a more focused business model. For 2023, it anticipates operational sales to rise by as much as 5.5%, reaching up to $97.9 billion. 

Investors who buy shares of the company today will get a stake in Kenvue, too. So, assuming management's claims about higher core-segment growth from the spinoff are true, J&J will continue its longstanding trend of steady and profitable expansion, with plenty of capital returned to shareholders along the way.

Using its dividend's growth of more than 85% in the last 10 years as a benchmark, paired with expectations for higher growth, the next 10 years will be a good time to hold its shares, same as always. The only difference will be that shareholders get those returns by holding the legacy business and the spinoff, rather than just one stock. 

Of course, even forever stocks aren't without risk. More than 38,000 people have sued the company, successfully alleging in court that its talc powder products cause cancer, and now it's on the hook for upwards of $3.5 billion in damages over the coming years. It'll survive, but don't be too surprised if legal fees put a dent in growth for a while.

2. NextEra Energy

Like Johnson & Johnson, NextEra Energy (NEE 0.45%) is a forever stock because it produces something that will always be in demand: Electricity. Furthermore, it produces that electricity using a mix of sources ranging from nuclear and coal power plants to solar and other renewables, which it's prioritizing investment in.

For 2022, it made nearly $21 billion in revenue, with more than $4.1 billion in net income, all produced by installing and operating its energy production resources. And with its subsidiary aiming to build out as many as 42 gigawatts of new renewable energy capacity and storage capacity through 2026, shareholders can expect plenty more growth in the medium term and beyond.

But that's just the usual for NextEra Energy. Over the last 10 years, shareholders experienced a compound annual growth rate (CAGR) of 10% in terms of the company's adjusted earnings per share (EPS). That kind of highly reliable growth is also anticipated to continue at a rate of up to 8% per year through at least 2026, per management. It also expects to keep hiking its dividend at a rate of 10% annually for at least the next couple of years, continuing the streak that saw its payout rise by 183.3% compared to 10 years ago.

With a forward dividend yield of around 2.4%, your returns from holding NextEra's stock will trickle in over a long period, as the business recoups its investments in clean energy projects. But if you're willing to hold for long enough, you'll see the cost basis of your shares driven down significantly by ongoing dividend hikes and the beneficial effect of its share repurchases.