Tech stocks have been the place to invest as the tech-centric Nasdaq Composite index returned 293% over the last 10 years compared to 170% for the blue-chip-heavy S&P 500. The growth opportunities in electric vehicles and artificial intelligence (AI) should drive even more returns for investors in Tesla (TSLA 8.04%) and Google parent Alphabet (GOOG 3.10%) (GOOGL 3.11%).

Here are two leading tech stocks that have a good chance of beating the market over the next decade.

Tesla

Tesla has been a phenomenal growth investment over the past decade. The stock delivered staggering gains as the company's revenue exploded from $2 billion to over $81 billion. Its shares sold off last year amid one of the worst years for auto sales in a long time, but this brand continued to shine, with revenue growing at high rates.

While Tesla stock looks expensive trading at a forward price-to-earnings ratio of 78, on a price-to-sales basis it trades at a fair valuation of 11 times trailing revenue. That is a reasonable price to pay for a fast-growing electric vehicle maker that has pushed profit margins higher in recent years.

TSLA Profit Margin Chart

TSLA Profit Margin data by YCharts

The market might be underestimating Tesla's prospects for even higher margins. The company is not only getting more efficient at manufacturing, but its efforts in software and high-performance computing are lucrative opportunities. For example, management sees the potential to offer its Dojo supercomputer, which the company is using to train machine learning models for self-driving assistance capabilities, to other companies as a service. 

Perhaps the best reason to invest in Tesla is its brand power. Tesla has got the cool factor going for it. This is a big component driving the growth of the business, and why I wouldn't underestimate management's goal to one day produce 20 million vehicles per year, up from nearly 1.4 million in 2022. 

As far as Tesla has come, it is still a relatively small player in the auto industry. It should be able to deliver the growth needed to push the stock much higher from growing its annual car production and finding new revenue streams from software. This is why investors shouldn't underestimate Tesla's ability to deliver market-thumping returns in the years to come.

Alphabet

Alphabet was another terrific performer for investors over the last 10 years. The stock has surged higher along with the rebound in the broader market year to date, but it still has enough growth ahead to pull ahead of the major indexes over the next decade. 

The shift to AI technologies is a big opportunity for the company, since AI is deeply rooted throughout Google's services and enterprise cloud business. Microsoft made a splash earlier this year after introducing new generative AI features to the Bing search engine, but Google is not losing sleep over it. Google still dominates search, which generated $40 billion in revenue last quarter, the company's largest revenue source.

In May, Google announced new generative AI features for its core search engine. It is already seeing 12 billion searches per month with Lens, a feature that allows users to search images they capture with their camera. Adding advanced functionality to its core search product should lead to more engagement from users, which will only bolster advertising growth and keep Google in the lead in the digital advertising market. 

Alphabet's Google Cloud business is also well-positioned to benefit from growing usage of AI technology. On the first-quarter earnings call, management mentioned several organizations that are using generative AI large language models on its cloud platform as well as other offerings, including cybersecurity. Google Cloud revenue made up a small portion of total revenue last quarter, but grew 28% over the year-ago quarter. 

Alphabet delivered average annual revenue growth of nearly 20% over the last 10 years, which was largely driven by mobile adoption. AI will drive the company's next leg of growth.

While Alphabet's revenue growth has slowed over the past year due to a weakened advertising market, it should accelerate as the economic outlook improves. Analysts expect the company to deliver annualized growth in earnings of about 17% per year over the next five years, which could lead to similar returns for investors who buy the stock today. The shares are attractively priced, trading at 23 times 2023 earnings estimates -- a small discount to the market average.