Most investors don't hold stocks for very long. The average holding period is less than a year. That's down from five years in the 1970s. This short-term mindset is unfortunate because frequently trading in and out of stocks can eat into investors' long-term returns by locking in losses and increasing taxes.

Holding a high-quality company long term enables investors to capitalize on its ability to compound shareholder value. Johnson & Johnson (JNJ -0.04%) and NextEra Energy (NEE 1.99%) have demonstrated their abilities to create lasting value for their investors. They're core long-term holdings, ideally suited for those desiring to make larger investments, like $2,500 or more. They could grow that investment into a much bigger windfall in the decades ahead.

An extremely healthy company

Johnson & Johnson has proven it can stand the test of time. The company has operated for more than a century. It has undergone many changes over the years, driven by its focus on science and innovation. It has become a global leader in innovative medicine and medical technology.

The healthcare company has a proven track record of growing shareholder value. It has increased its dividend for 61 straight years. That has it in the elite class of Dividend Kings. The company has steadily grown its dividend by investing heavily in research and development to develop new blockbuster medicines and medical technology.

It also makes acquisitions to enhance its operations and innovation. These investments have paid off for investors over the long term by growing its profits, enabling the healthcare giant to generate healthy total returns. For example, a $2,500 investment in Johnson & Johnson in 1980 would have grown into over $650,000:

JNJ Total Return Level Chart

JNJ Total Return Level data by YCharts.

Johnson & Johnson is in an excellent position to continue growing shareholder value. It's a financial fortress as one of only two companies in the world with an AAA bond rating. The healthcare behemoth ended the third quarter with $24 billion in cash against $30 billion in debt.

Meanwhile, it's a free-cash-flow-generating machine, producing $13 billion in the third quarter alone. The company's strong balance sheet and free cash flow allow it to pay dividends, repurchase shares, and invest in its continued expansion as it capitalizes on the steadily growing healthcare market.

Cashing in on a key long-term growth trend

NextEra Energy's roots go all the way back to 1925. The utility company has grown tremendously over the years. It's now the country's largest electric utility. It's also among the world's biggest wind and solar energy producers.

The energy company also has an excellent record of growing shareholder value. It has increased its dividend annually for more than a quarter century. Powering its steady growth have been investments to expand its electric utility and its efforts to build out a leading renewable energy platform. That has helped power strong total returns over the years. A $2,500 investment in 1980 would have grown into more than $425,000:

NEE Total Return Level Chart

NEE Total Return Level data by YCharts.

NextEra Energy is in an ideal position to continue growing shareholder value. It's investing heavily to reduce the carbon emissions of its electric utility by installing more solar panels and switching fuel sources to lower-carbon energy like renewable natural gas and hydrogen. It also continues to expand its energy resources segment by building out additional renewable energy and battery storage capacity.

The company has one of the strongest balance sheets in the utility sector. That gives it tremendous financial flexibility to fund new investments. It can also borrow money at more attractive terms than rivals, which increases its returns.

Given the growing demand for renewable energy, the company has a vast opportunity to continue expanding. It anticipates the U.S. will need to invest trillions of dollars over the coming years to decarbonize. That should enable NextEra Energy to continue expanding its operations as it invests to build more clean energy capacity. Those investments should grow its earnings, giving NextEra more fuel to increase its dividend and create value for shareholders.

Wealth-building machines

Warren Buffett has said his favorite holding period is forever. That's the mindset investors should have with Johnson & Johnson and NextEra Energy. They're elite companies with excellent histories of growing shareholder value over the long haul. Given their strong balance sheets and focus on growing markets, they should continue enriching their investors in the decades ahead.