Long-term investing has been shown to be a much better way to building wealth than short-term trading, but figuring out what stocks are worth owning in portfolios for the long haul is challenging. If you're struggling to decide what companies to buy, these three Motley Fool contributors can help. Here's why they think Illumina, Inc. (ILMN 1.91%), The Boeing Company (BA 0.81%), and Square, Inc. (SQ 2.63%) could be perfect stocks to buy and hold for decades.

A great way to bet on next-generation medicine

Todd Campbell (Illumina, Inc.): The mapping of the human genome has ushered in a wave of discoveries that are helping patients live longer. Betting on biotech stocks developing next-generation drugs is one way to benefit from revolutionary medicine tailored to patient DNA, but a safer way to invest in the trend may be to buy and hold Illumina, Inc. shares.

A man in a dress shirt and tie sits against a wall next to a piggy bank as U.S. dollar bills fall down around him.

IMAGE SOURCE: GETTY IMAGES.

Illumina is the leading manufacturer of systems used by researchers to sequence DNA. Because it already has thousands of its sequencing machines deployed globally and those machines generate revenue for it every time a new test is done, its business is booming.

Last year, the company launched its latest generation of sequencing machines, and since those machines can sequence genes faster, more accurately, and at a lower cost, increasing demand for consumables used in gene sequencing propelled revenue 31% higher year over year to $782 million.

Since 2010, Illumina's revenue has been up over 250%, and in the past five years, the company's adjusted earnings per share has grown by a compounded 20% annually. That's impressive, but I think we'll see demand grow even more as innovation drives the cost of gene sequencing down further. New deals with drugmakers to develop companion diagnostics could help make genetic analysis critical to treating complex diseases, such as cancer, and if gene sequencing becomes standard, then Illumina's could be one of the best stocks to stash away in forever portfolios.

Intriguing acquisition

Daniel Miller (The Boeing Co.): When investors are holding stocks for decades, you can aim for young companies poised to thrive with upcoming trends or a proven company that will be around for ages. The Boeing Co. is a clear candidate for the latter in a world with increasing air traffic and competitive advantages -- and the aircraft juggernaut just got even better.

In addition to a strong quarterly report, last month Boeing announced it would buy aerospace parts company KLX Inc. for roughly $3.2 billion in cash to expand its aircraft services business. It's an intriguing move for investors as it won't immediately add to Boeing's capital expenditures strategy and will generate roughly $70 million in cost savings by 2021. But the real treat of this acquisition is that it will provide a significant boost to Boeing's higher-margin services and spare parts business -- management intends to compete and win in a $2.6 trillion 10-year services market.

Even before considering how that acquisition can add to growth and margins, Boeing was already a great stock to own for decades, given that it anticipates the need for 41,000 commercial aircraft deliveries over the next two decades for an estimated $6.1 trillion. As the cherry on top, holding Boeing over a few decades will allow you to collect a rapidly increasing dividend payment.

BA Dividend Chart

BA Dividend data by YCharts.

So, if there's a proven and stable stock worth owning for decades, Boeing should be at the top of that list.

The future of digital payments

Leo Sun (Square): Square is disrupting the traditional point-of-sale (POS) systems market with next-gen payment solutions -- including Square Reader, a credit card-reading dongle for smartphones; Square Stand, which converts iPads into POS systems; and Square Register, which evolves the Stand into a stand-alone POS unit.

Square tethers those merchants to its expanding digital ecosystem, which includes its business analytics and CRM tools, its peer-to-peer payments platform Square Cash, its restaurant delivery and catering services Caviar and Zesty, its website creation platform Weebly, and Square Capital -- which offers financing for Square merchants.

Demand for Square's products and services has been surging. Last quarter, gross payment volume (GPV) across its platform rose 31% annually to $17.8 billion, and its adjusted revenue jumped 51% to $307 million. Square expects adjusted revenue to climb 44% this year. Square's adjusted EBITDA rose 33% annually to $36 million last quarter. For the full year, Square expects its adjusted EBITDA to surge 76%.

The bears often argue that Square's growth could be throttled by competitors in digital payments like PayPal, mobile players like Apple, and first-party payment platforms from companies like former partner Starbucks. Square certainly shouldn't dismiss those threats, but its first mover's advantage and incredible growth give it a fairly wide moat.

Over the next few decades, Square could evolve into a one-stop shop for digitizing and maintaining a business. That makes it a very lucrative stock to own for the long run.