As one of the most prominent healthcare companies on Earth, Johnson & Johnson (JNJ 0.38%) is a stock that's much loved by investors on account of its metronome-like consistent returns. Between its gradually increasing dividend and plenty of reasons to expect that the business will be more valuable tomorrow than it is today, it's easy to assume that it has a knack for beating the market. 

But it doesn't. In fact, the stock often underperforms the market's growth on shorter timescales. So how much would you have if you made a moderately sized investment of $5,000 a mere five years ago? Let's find out. 

You probably wouldn't be too disappointed

If you invested $5,000 in Johnson & Johnson in mid-2018 and reinvested all your dividends, you'd currently be enjoying a total return of 53%, which means you'd have around $7,640. If, on the other hand, you spent 100% of your dividends as soon as they hit your account, your shares would be worth roughly $6,689. But either way, your investment would have gained a bit, and thanks to this company's reputation for stability and enduring growth over time, you probably didn't have any problem with sleeping soundly.

Critically, that would probably still have been the case when the market crashed in March 2020, at least with regard to this stock. Johnson & Johnson's shares bounced back to exceed their prior highs within a quarter of the crash. 

The catch is that if you'd simply bought $5,000 of the SPDR S&P 500 ETF Trust, you'd have $8,648 today, assuming you've reinvested the dividends you received. And since the market-tracking ETF is maximally diversified, you'd probably not be worrying about your investment either. If anything, you'd sleep even sounder, as the last few years saw J&J reeling under a barrage of self-inflicted problems that shredded its public image and ran up a significant bill. 

Those problems ranged from its billions of dollars paid out in settlements to people who got cancer because of its asbestos-contaminated talc powder products, to other settlements worth billions of dollars stemming from its role in precipitating the opioid abuse crisis in the U.S. Shareholders are going to get a smaller slice of the pie for years as a result. 

Will the future see snappier returns with this stock? 

Is there a chance that an investment in Johnson & Johnson today might do better than in the recent past? It's definitely possible. 

Now that its spinoff of Kenvue, its consumer health products division, is complete, the company is focused around doing research and development (R&D) to support the growth of its pharmaceutical and medical device segments. That means it won't directly get the reliable revenue from consumer health brands it once owned, like Band-Aids and Aveeno moisturizers. But it won't need to pay the substantial costs of maintaining the global manufacturing and logistical footprints necessary to get people to buy those products either, so the result is likely that it will grow faster. 

How much faster? Not enough to knock your socks off just yet; Wall Street analysts are estimating on average that its shares will be worth 8.2% more in a year than they are worth right now. Hikes to J&J's dividend may pick up in speed moving forward to juice shareholder returns if there's more cash left over each quarter. Over the last 10 years, the company only increased its dividend by an average of 6.3% annually, which is nothing to write home about. Admittedly, its history of paying out a bit more with each year without fail is a whopping 61 years and running, so its payout can be counted on. 

But seeking fast growth isn't exactly the point of an investment. Think of this investment as more of a marathon. The longer you hold on to your shares and reinvest your dividends, the more the plodding pace of bottom line growth over the decades will have time to pay off.

Not convinced? If you'd bought $5,000 of shares of J&J 30 years ago, in 1993, you would now have upwards of $164,360, utterly smashing an equally sized investment in a fund tracking the S&P 500, which would leave you with only $85,760. While I wouldn't bet on this stock beating the market in the next 10 or even 20 years, by 2050, it's very likely that the people who invested in it today will be sitting on a much bigger pile of money than a market fund. Given its consistent performance over time, management would probably not have it any other way.