Tech stocks skyrocketed last year as excitement over budding industries like artificial intelligence (AI) and cloud computing rallied investors. The Nasdaq-100 Technology Sector index rose 67% throughout 2023, significantly improving from the year before when it plunged 40%. And the market has shown no signs of slowing, making 2024 an excellent time to expand your position in tech.

Nvidia was one of the biggest winners last year as it snapped up a majority market share in AI chips. Its stock is up 224% year over year, making it an attractive option for investing in AI and tech in general. However, there are other stocks with similar secular tailwinds in tech that could offer more value than the chipmaker.

So forget Nvidia in 2024. Here are two tech stocks to buy instead.

1. Microsoft

Microsoft (MSFT 1.82%) made headlines last week by surpassing Apple as the world's most valuable company, with a market cap close to $2.9 trillion. The company has become a behemoth in tech, with growth catalysts across the industry.

The tech giant is home to some of the most widely recognized brands: Windows, Office, Xbox, LinkedIn, and Azure, which attract billions of users. These services grant Microsoft lucrative positions in markets such as operating systems, productivity software, digital advertising, cloud clouting, AI, and video games.

The growth of these products sent Microsoft's stock soaring 280% over the last five years, with annual revenue up 68%. Meanwhile, its free cash flow hit over $63 billion in 2023, giving it the funds to invest heavily in its research and development.

So, it's not surprising that Microsoft has sunk billions into AI over the last year. A heavy investment in ChatGPT developer OpenAI granted Microsoft a 49% stake in the start-up. OpenAI's tech and popular services from Office and Azure could prove a powerful combination, giving Microsoft almost endless ways to monetize its AI offerings.

NVDA PE Ratio (Forward) Chart

Data by YCharts

These charts show Microsoft's stock is also significantly cheaper than Nvidia's. The company has lower figures in three key valuation metrics: forward price-to-earnings (P/E), price-to-free cash flow (P/FCF), and price-to-sales (P/S) ratios.

Forward P/E is calculated by dividing a company's current share price by its estimated future earnings per share. Meanwhile, P/FCF divides its market cap by free cash flow. Forward P/S uses a similar calculation, dividing its market cap by estimated revenue. For all three metrics, the lower the figure, the better the value.

These are great ways to determine the value of a company's shares as they take into account its financial health against its stock price. In each metric, Microsoft is a far bigger bargain than Nvidia.

2. Alphabet

Alphabet (GOOG 9.96%) (GOOGL 10.22%) was slightly overshadowed last year by cloud giants like Microsoft and Amazon. However, the company has spent the last year developing a highly anticipated AI model called Gemini that could give it an edge in the market.

Alphabet is one of the most reliable investment options in tech, with a stock that has steadily risen 113% since 2019. Meanwhile, revenue and operating income have soared 75% and 108%.

Much of its success is owed to its dominance in the digital advertising market. The company holds a 25% market share in the industry thanks to the massive user base it has built up through YouTube, Google, Android, and Chrome. These platforms attract billions of users, presenting countless advertising opportunities.

The popularity of these services will likely prove a major asset when expanding in AI. With the help of Gemini, Alphabet will be able to create a Search experience closer to ChatGPT, add new AI tools on Google Cloud, offer more efficient advertising, and better track viewing trends on YouTube.

Alongside over $77 billion in free cash flow, it's hard to ignore the growth potential of Alphabet's business and stock.

NVDA PE Ratio (Forward) Chart

Data by YCharts

Like Microsoft, Alphabet's stock offers far more value than Nvidia. The tables above show Alphabet's forward P/E, P/FCF, and P/S ratios are substantially lower than the chipmaker, making its stock less of a risk.

Nvidia's meteoric rise last year has made it an expensive option. However, Alphabet remains a bargain with significant potential in tech.