The benchmark S&P 500 index ripped higher in 2023 with a gain of 23.5% so far. But most of that return was driven by the "Magnificent Seven" stocks, which managed to obliterate the return of the broader market.

A chart showing the 2023 gain of the Magnificent Seven stocks.

The Magnificent Seven stocks now have a combined value of $12 trillion! As a result, they have a dominant weighting in the S&P 500, accounting for 28% of its total value. That means they have a significant impact on the direction of the entire market. When you look at the S&P 500 Equal Weight Index -- which levels the playing field by attributing an equal value to all 500 stocks in the S&P 500 regardless of their size -- it's up just 10% this year.

With that in mind, investors looking to beat the market in 2024 will probably need some exposure to the Magnificent Seven stocks. Below, I'm going to highlight two Magnificent Seven stocks that could have the most potential in 2024.

A black Tesla car driving on an open road in the snow.

Image source: Tesla.

1. Tesla is forcing its competitors to retreat

Tesla (TSLA -2.00%) is the undisputed leader in global electric vehicle sales. The company is on track to produce 1.8 million cars this year, and CEO Elon Musk believes that number could reach 20 million by 2030.

However, Tesla is having an uncharacteristically slow year in terms of financial growth, because it has engaged in a price war with start-ups and legacy automakers breaking into the EV space. Tesla has economies of scale, which means it makes a profit on every vehicle it sells, so it had enough room to slash prices by 20% (on average) since August 2022 to pressure the competition.

It appears to be working. Ford -- which loses roughly $36,000 on every EV that rolls off its production line -- recently decided to postpone $12 billion worth of investments into its EV business. Similarly, General Motors scaled back its EV plans and abandoned its target to produce 400,000 units by mid-2024.

Those automakers are realizing it will require a significant amount of time and resources to reach Tesla's level to be able to compete on price. Meanwhile, they are under pressure from shareholders to avoid diluting the profits generated by sales of their gas-powered cars.

But Tesla's price cuts are having consequences on its own business. The company is on track to generate $97 billion in revenue this year, representing a 19% year-over-year increase -- that's less than half the growth rate it delivered in 2022. Plus, its earnings per share will have shrunk once 2023 is officially in the books, according to Wall Street's consensus forecast.

While neither of those developments is positive, they might be a necessary short-term sacrifice to secure more market share for the long term, which will ultimately benefit Tesla's investors. Plus, inflation and interest rates are gradually declining, which will reduce financial pressures on consumers in the new year, and that could open the door for Tesla to reverse some of its recent price cuts.

Tesla stock isn't cheap; it trades at a price-to-earnings (P/E) ratio of 80, which is almost triple the 29.6 P/E of the Nasdaq-100 technology index. But a combination of favorable economic conditions and retreating competitors should set up a great year for the company. In fact, Wall Street predicts Tesla's earnings will return to expansion territory in 2024, which makes its stock look a little cheaper on a forward basis.

2. Meta Platforms could deliver the most profitable year in its history

Meta Platforms (META 2.05%) will enter 2024 on the back of its best year ever. Investors criticized its CEO, Mark Zuckerberg, for a lackluster operating performance in 2022, prompting him to launch a radical "year of efficiency" in 2023. The concept featured three key changes:

  1. Cost cuts: This involved over 21,000 job cuts, a flatter organizational structure, and a reduction in spending across the board.
  2. Shrinking the metaverse: Not literally -- but Zuckerberg committed to spending less money on virtual reality initiatives, which were burning cash and generating almost no revenue. In fact, Meta's Reality Labs segment lost a whopping $13.7 billion in 2022.
  3. Artificial intelligence (AI): Meta is focusing its time and resources on improving the user experience on Facebook and Instagram with AI.

The AI part of the equation is the most exciting long-term opportunity. Meta's Reels feature -- which is designed to compete with ByteDance's TikTok -- has driven a 40% increase in the amount of time users spend on Instagram since launching in 2020. But AI-powered recommendations are a huge part of that; Meta's algorithm learns what users enjoy watching, and it feeds them more of that content to keep them engaged.

Meta has now rolled out AI-based recommendations to nearly all of its content formats. This year alone, Zuckerberg says they have driven a 6% increase in time spent on Instagram, and a 7% increase for Facebook. Ultimately, the longer users spend on either of those platforms, the more opportunities Meta has to feed them ads to generate revenue.

It's no coincidence that in the third quarter of 2023 (ended Sept. 30), Meta's revenue hit an all-time high of $34.1 billion. Plus, thanks to the company's cost cuts, its net income (profit) absolutely soared by 163% to $11.5 billion, another record.

Meta is now on track to deliver $133.5 billion in revenue and $14.35 in earnings per share (EPS) for the 2023 full year. That places its stock at a P/E ratio of just 23.3, making it the cheapest of the Magnificent Seven stocks.

But it gets better. Wall Street predicts Meta's earnings will grow to $17.39 EPS in 2024, placing its stock at a forward P/E ratio of 19.20. If the estimate holds up, Meta stock will have to surge 50% next year just to trade in line with the current P/E of the Nasdaq-100 index. On a valuation basis alone, this opportunity might be the key to many investors outperforming the broader stock market next year.