The S&P 500 is up 25% so far this year. That's after a 16% 2020 gain despite the COVID-19 pandemic. Gains this high are not normal, as the market tends to average around 8% a year over the long term.

What's even more remarkable is that the 10 largest components of the S&P 500 are up -- wait for it -- an average of 50% year to date.

Now if you're looking at your portfolio wondering why it's underperforming the market this year, you aren't alone. Beating the stock market in 2021 is nearly impossible without these 10 stocks. Here's why.

An illustration of a car embedded in a computer chip.

Image source: Getty Images.

Flexing their muscles

The math here is beautifully simple. The 10 largest holdings of the S&P 500 make up 29% of the index. As mentioned, they are collectively up an average of 50% of the year, which contributes a gain of 13 percentage points to the S&P 500's return. That's around half of the index's gain from these 10 stocks alone. So, without their contribution, the index is up a whole lot less. 

Company

S&P 500 Weight

YTD Gain

Effect On S&P 500 YTD Return

Microsoft (NASDAQ:MSFT)

6.4%

54%

3.47 percentage points

Apple (NASDAQ:AAPL)

6.2%

21%

1.30 percentage points

Amazon (NASDAQ:AMZN)

4%

13%

0.52 percentage points

Alphabet (NASDAQ:GOOGL) (NASDAQ:GOOG)

2.3%

70%

1.58 percentage points

Tesla (NASDAQ:TSLA)

2.2%

61%

1.36 percentage points

Meta Platforms (NASDAQ:FB)

2%

26%

0.53 percentage points

Nvidia (NASDAQ:NVDA)

2%

153%

3.03 percentage points

Berkshire Hathaway (NYSE:BRK.A) (NYSE:BRK.B)

1.3%

21%

0.27 percentage points

JPMorgan Chase (NYSE:JPM)

1.2%

27%

0.33 percentage points

Home Depot (NYSE:HD)

1.1%

54%

0.58 percentage points

Data sources: Yahoo! Finance, YCharts, Slickcharts

Dissecting the S&P 500

We talk about the S&P 500 all the time, but we don't always discuss what makes up the index and why it moves the way it does. It may surprise you to learn that technology stocks actually make up over a quarter of the whole index, and that's dominated by big companies like Apple and Microsoft. Similarly, the energy sector, which is actually the best-performing sector of 2021 (even better than tech) only makes up 3% of the index. So, the energy sector could double and it would contribute less than Microsoft stock's 3.47 percentage point contribution so far this year.

Chart comparing the performance of the 10 stocks discussed in the article with the S&P 500's for 2021.

MSFT data by YCharts

What to do about it

One of the biggest mistakes we can make as investors is obsessing over short- to mid-term performance. Zooming in to a particular quarter undermines the big picture. For example, there are plenty of stocks that absolutely crushed the market in 2020 that are underperforming or even down big this year (think Zoom, PayPal, Square, Teladoc, and Peloton, to name a few). 

While it's easy to say that those companies are underperformers this year, keep in mind they are still net winners over the last two years. 

A note of reassurance

Let's say that for a few years now, you've been underperforming the market because you haven't held the stocks that have really driven the index's returns. The truth of the matter is that you're still probably a lot better off because you were in the market in the first place. So if you're up, let's say, half of what the index is, you're still growing your wealth at a much quicker pace than folks who aren't in the market at all.

The most important priority is your financial goals. If you're investing in dividend stocks to supplement income in retirement, then you're playing a different game than growth-oriented investors. Similarly, if you're a value investor who focuses on stodgy, slow-growing, but safe companies that let you sleep at night, then it's simply expected that you're going to underperform a growth-driven market.

Focus on what really matters

The point here is that comparing your performance to the S&P 500, for better or for worse, is usually unhelpful. As long as you're investing in companies, cryptos, or other securities that you understand and that are helping you reach your goals, then the rest is little more than bragging rights.

The market moves in cycles. And while we may be living in a multi-year period of growth (especially mega-cap tech growth), there could be a few years where it shifts from growth to value, or from large-cap tech growth to small-cap growth. Hopefully, you're left with a better understanding of what's really driving the S&P 500 and why it's so easy to underperform if you didn't own stocks like Microsoft, Nvidia, or Tesla this year

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.