You may be more familiar with the major stock indexes than you think. There's the Dow, of course, whose full name is the Dow Jones Industrial Average (^DJI 0.40%), and the S&P 500 (^GSPC 1.02%). There are some interesting differences between these indexes, such as the fact that one contains all of the "Magnificent Seven" stocks and the other, until recently, held only two.

Here's a closer look at those seven impressive stocks, which indexes they're in, and why their index memberships may matter.

A colorful graph is shown, with a red arrow going upward.

Image source: Getty Images.

Meet the Magnificent Seven

The companies in question have all been amazing performers in the last decade or more, making many shareholders significantly wealthier.

Stock

10-Year Average Annual Return*

Apple

26.1%

Amazon.com

23.5%

Alphabet (Google's and YouTube's parent)

19.0%

Meta Platforms (Facebook's and Instagram's parent)

22.1%

Microsoft

27.9%

Nvidia

65.9%

Tesla

32.1%

Source: TheOnlineInvestor.com.
*Dividends not reinvested.

Over the past decade, the S&P 500 averaged annual gains of 11.7%, without reinvesting dividends. The Dow averaged 10.6%. It should now be clear why these companies' stocks are described as "magnificent."

Get to know the Dow -- and the S&P 500

Now let's take a look at these two major stock indexes.

The Dow

You might not know that this major stock index, often used as a proxy for the entire U.S. stock market, contains only 30 stocks. It's more than 125 years old and aims to be diversified, with components including American Express, Boeing, Disney, IBM, Visa, and Walmart.

A particularly interesting aspect of the Dow index is that it's price-weighted., with its figure an average of all its components' stock prices. (It's actually a bit more complicated than that, involving a "divisor.") Being price-weighted means that components with higher stock prices will carry a higher weight and will have a bigger influence on the index's movement.

Consider, for example, that component Verizon Communications recently had a stock price of $36.69, while fellow component UnitedHealthcare had a price of $525.32, more than 14 times bigger. That means that UnitedHealthcare's stock-price movements will have a much bigger impact on the index -- and that if it were to split its stock, ending up with a lower stock price, it would have a much smaller impact than before. Weighting by price is not generally viewed as a great way to build an index.

The S&P 500

The S&P 500, meanwhile, is made up of 500 of America's biggest companies, ranging from Apple and Microsoft, each with recent market values near $3 trillion, to News Corp. and Ralph Lauren, with recent market values of $15 billion and $12 billion, respectively.

The S&P 500, like many stock indexes, is market-cap-weighted, meaning that companies with larger market capitalizations will carry greater weightings and will influence the index more, and vice versa. While Apple and Microsoft recently carried weightings of about 6% and 7%, respectively, both News Corp. and Ralph Lauren sported weightings of 0.01%.

The "Magnificent Seven" and stock indexes

Now let's get back to the Magnificent Seven. As you might have suspected, all seven are in the S&P 500. But despite the prestige of the Dow and despite the dominance of the seven companies, all are not in the Dow.

In fact, until recently, only Apple and Microsoft were in the Dow. As of February 26, though, Amazon is a Dow component, with Walgreens Boots Alliance having been ejected.

So what does it mean, whether some or all of the Magnificent Seven are in a particular index? Well, given that the S&P 500 is market-cap weighted and that the seven companies are behemoths, they have a lot of power to move the index. In fact, as of the end of 2023, the seven accounted for almost 30% of the entire value of the S&P 500's market value. So while, yes, the index contains 500 companies, clearly many of them don't move the needle much at all.

That factoid also hints at this: If you want to invest in all seven companies, investing in a simple, low-fee S&P 500 index fund will quickly have you owning a bit of each -- indeed, around 30% of that investment will be in just those seven businesses.

Know, too, that indexes are not static, and they do shuffle their components a bit now and then. So in the coming years, we might see another of the seven join the Dow. And should one of them implode, it might get ejected from one or more indexes. Know, too, that when a stock is added to an index, you might see a bit of a jump in its price -- because all of a sudden, all the index funds tracking that index will need to buy shares.

This is all interesting, but does it really matter to you, as an investor? It does, if you invest in index funds, as many, if not most, of us would do well to invest in. The more large, fast-growing, and dynamic companies, such as the Magnificent Seven, that are in an index, the more rapidly the index might grow -- and the index funds that track it, as well.