If you've got $5,000 you're looking to put away for the long term, consider technology companies. They can deliver handsome returns to investors with a long-term mindset. That's because they typically grow revenue more robustly than, for example, brick-and-mortar retail businesses. 

Meta Platforms (META 1.54%) and Alphabet (GOOGL 0.35%) (GOOG 0.37%), specifically, are excellent tech stocks to buy and hold for the long term. Each has a dominant position with its services and coincidentally operates in the advertising industry with its massive total addressable market. Let's take a closer look at these two buy-and-hold potentials.

A person on a laptop.

Image source: Getty Images.

1. Meta's stock price has cratered 

With the headwinds Meta Platforms faces in the near term, it can be easy to forget its dominance. The company, formerly known as Facebook, boasts 2.8 billion daily active users across its family of social media apps, including Facebook, Instagram, Messenger, and WhatsApp. That figure was 8% higher year over year, so despite its size, the company is finding new individuals to attract.

The key word in the metric mentioned above is daily. There are billions of people opening one of Meta's family of apps every day. Meta's apps have been around for several years, and it's hard to break a habit you've been doing daily for years. Daily habits may be bad news if you're trying to quit smoking, but it's great news if you're an investor considering Meta Platforms' stock.

Meta Platforms' apps are free to join and use, so its revenue model is instead centered around showing targeted ads to users. Judging by Meta's revenue growth from $5 billion to $118 billion in the last decade, you can reasonably infer that marketers are getting an excellent return from the ads they place on a Meta app. Similarly, Meta's operating profit margin increased from 10.6% to 39.6% during that time. That suggests Meta is getting much better at efficiently monetizing its users.

FB Revenue (Annual) Chart

FB Revenue (Annual) data by YCharts

Meta has seen some near-term headwinds that have led to a 49% drop in its stock price since last September. Those headwinds relate to increased competition for users' time, smartphone operating system privacy changes, and some short-term macroeconomic factors. With revenue growing as robustly as it has in the last decade and operating profit margins so high, Meta offers investors wiggle room even if these headwinds persist and will give the company time to manage the situation as well as develop new revenue streams (especially as it relates to the metaverse).

2. Alphabet is home to Google, the world's top search engine

Google's share of worldwide search engine queries hovers steadily around 80% and has done so for years. Since so many purchase decisions start with an internet search, that's a valuable asset to own. Businesses covet the opportunity for their website to appear amid customer search queries. 

That desire has driven Alphabet's annual revenue from $46 billion a decade ago to its current $258 billion. Appearing in search engine results brings highly qualified customers to businesses, likely to remain valid for several decades more. People won't take the time to search for something they are not interested in; that's human nature.

GOOG Revenue (Annual) Chart

GOOG Revenue (Annual) data by YCharts

Alphabet's overall revenue is substantial but it also raises questions about whether growth can continue at its current pace. The answer is that continued growth is likely. Marketers spent $763 billion on ads last year, a total that was 22.5% higher than the previous year. The advertising industry is massive but its also still growing at a significant rate, suggesting that Alphabet has plenty of potential new addressable markets to go after for years to come. It also has its alternate revenue streams to continue growing, including cloud computing, Google Services, and Other Bets (like Waymo driverless vehicles). 

Meta Platforms and Alphabet have captured leadership positions in the industries they serve. Their chosen businesses benefit from consumer habits that are unlikely to change. For those reasons, Meta Platforms and Alphabet are two tech stocks you can buy and hold for the long term.