2 Tech Stocks You Can Keep Forever

Warren Buffett famously stated that his favorite holding period for well-run companies was "forever." Yet Buffett also avoided tech stocks for most of his career, following his own rule to never invest in companies that he couldn't fully understand. Therefore, investors might think that it could be tough to find"forever" picks within the tech sector.

Image source: Getty Images.

However, I believe that there are two easy-to-understand tech stocks that can be held for the long term -- Google's parent company Alphabet (NASDAQ: GOOG) (NASDAQ: GOOGL) and Facebook (NASDAQ: FB). Both companies dominate their respective markets and have extremely wide competitive moats.

Alphabet

Alphabet owns the world's most popular search engine (Google), mobile operating system (Android), webbrowser (Chrome), video streaming site(YouTube), and mobile navigation app(Google Maps). It ties that sprawling ecosystem together with Gmail, one of the most popular email services in the world, and its cloud storage platform Google Drive.

Alphabet uses all the data gathered from those sources to craft targeted ads for its users, making it the 800-pound gorilla in internet advertising. Its advertising revenues rose19% annually to $19.14 billion last quarter, or 89% of the company's top line. That represents an acceleration from 16% growth in the previous quarter and 11% growth a year earlier. Analysts expect Alphabet's revenue to rise 18% this year and 15% next year.

Image source: Pixabay.

Since digital ads are a high margin business, Alphabet is also highly profitable, finishing last quarter with a non-GAAP operating margin of 35%. Non-GAAP net earnings rose 20% during the quarter, and analysts expect Alphabet's annual earnings to grow at an average rate of 18% over thenext five years.

That estimate gives Alphabet a 5-year PEG ratio of 1.3. That isn't below the threshold of 1 for "undervalued" stocks, but it indicates that the stock still has room to run over the long term. Moreover, some of Alphabet's "moon shots" -- like medicine, medical devices, and driverless cars -- might eventually evolve into fresh sources of revenue.

Facebook

Facebook is the world's largest social network. Despite its massive size, it stillgrew its monthly active users (MAUs) 15% annually to 1.71 billion last quarter. It also owns Instagram, which had500 MAUs as of June, and WhatsApp, which crossed a billion MAUs inFebruary. It's also been expanding into adjacent markets like virtual reality with Oculus VR, enterprise networking with Facebook at Work, e-commerce with Facebook Marketplace, and monolithic messaging and services with its stand-alone Messenger app.

Like Alphabet, Facebook uses the data it gathers to sell targeted ads. Last quarter, the company's advertising revenues soared a whopping 63% annually to $6.24 billion and accounted for 97% of of its top line. Facebook still generates less ad revenue than Google, but its ability to deliver ads along social pathways strategically counters Google's search and location-based ads. Analysts expect Facebook's salesto rise 51% this year and 35% next year,indicating that its growth story is far from over.

Since Facebook also sells high-margin ads, it finished last quarter with a GAAP operating margin of 43%. Net earnings rose 184%, allaying earlier concerns about the company's spending habits. Over the next five years, analysts expect Facebook's annual earnings to grow 35% per year, giving it an undervalued PEG ratio of 0.9.

Looking further ahead, Facebook could become much more than a social network that relies on ad sales. The Oculus Rift and its Oculus Home ecosystem could generate substantial hardware and software revenue. Messenger, which already has overa billion MAUs, could expand into its own ecosystem of apps, services, mobile payments, and more.

The Oculus Rift. Image source: Oculus VR.

But mind the potential headwinds

I believe that investors who hold Alphabet and Facebook for decades will be richly rewarded, since neither company faces any meaningful competition. As long as people need to digitally search for things or connect to people, there will be a market for their products.

That's not to say that Alphabet and Facebook won't face near-term challenges. Economic slowdowns cloud throttle ad spending, while probes regarding privacy and anticompetitive practices could weaken their ability to gather data or expand their ecosystems. But I believe that both companies are already tethered to so many people and businesses that they will overcome those hurdles and continue growing for decades to come.

A secret billion-dollar stock opportunity The world's biggest tech company forgot to show you something, but a few Wall Street analysts and the Fool didn't miss a beat: There's a small company that's powering their brand-new gadgets and the coming revolution in technology. And we think its stock price has nearly unlimited room to run for early in-the-know investors! To be one of them, just click here.

Suzanne Frey, an executive at Alphabet, is a member of The Motley Fool's board of directors. Leo Sun has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Alphabet (A shares), Alphabet (C shares), and Facebook. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.