The S&P 500 (^GSPC -0.41%) is trading at an all-time high on the back of its 11.8% gain this year so far. It adds to a lengthy track record of success for the index, which has delivered a compound annual total return, i.e., with dividends reinvested, of 10.4% since it was launched on March 4, 1957.

One of the safest ways to invest in the stock market is to purchase shares in an exchange-traded fund (ETF) that closely tracks the performance of the S&P 500. However, ETF issuers, like Vanguard, also offer a broad selection of funds to suit investors with a higher appetite for risk.

Some of them have a proven track record of beating the S&P 500 over a long period of time, because they are heavily weighted to top-performing sectors like technology. Here's why the Vanguard S&P 500 Growth ETF (VOOG -0.87%) and the Vanguard Information Technology ETF (VGT -0.04%) could help investors outperform the market going forward.

1. Vanguard S&P 500 Growth ETF (VOOG)

The Vanguard S&P 500 Growth ETF is constructed to track the performance of the S&P 500 Growth index, which holds 228 out of the 500 stocks in the S&P 500. It selects those 228 stocks based on their momentum, their revenue growth, and the ratio of their earnings change to their stock price.

In other words, only the best performers from the S&P 500 make it into the Growth index (and the ETF), and the rest are excluded. Unsurprisingly, the top five holdings in the fund all hail from the technology sector, which routinely outperforms the rest of the market:

Stock

Vanguard S&P 500 Growth ETF Portfolio Weighting

1. Microsoft

12.48%

2. Apple

10.67%

3. Nvidia

9.21%

4. Amazon

6.90%

5. Alphabet Class A

4.14%

Data source: Vanguard. Portfolio weightings are accurate as of April 30, 2024, and are subject to change.

Considering the above five stocks make up 43.4% of the total value of the ETF, it is heavily influenced by their performance. That has been a huge positive recently because Nvidia shares, for example, have surged 165% over the past year. But if such trends reverse, it could lead to a period of mediocre returns for this ETF.

With that said, each of those five companies aggressively invests in new technologies like artificial intelligence (AI). Microsoft agreed to inject $10 billion into AI start-up OpenAI last year, and it's integrating the latest GPT-4 models into popular products like Windows, 365 (Word, Excel, and PowerPoint), and the Azure cloud platform. Nvidia, on the other hand, designs the most powerful AI chips for the data center, which is where those models are developed.

Beyond its top five positions, the fund holds other tech powerhouses like Tesla and Netflix, but it also contains many stocks outside the tech sector like industrial giant Caterpillar and beverage conglomerate Coca-Cola.

The Vanguard S&P 500 Growth ETF was established in 2010 and it has generated a compound annual return of 15.3% since then, even after discounting its expense ratio (annual fee) of 0.1%. The S&P 500 has returned 13.1% annually over the same period, and while that 2.2-percentage-point difference each year doesn't sound like much, it really compounds over time:  

Index/Fund

Starting Balance (2010)

Compound Annual Return

Balance (2024)

Vanguard S&P 500 Growth

$10,000

15.3%

$73,385

S&P 500

$10,000

13.1%

$56,037

Calculations by author.

2. Vanguard Information Technology ETF (VGT)

Investors who are comfortable taking on a little more risk in the pursuit of even better returns might prefer the Vanguard Information Technology ETF. It holds 312 different stocks, but it is far less diversified than the first ETF because it focuses solely on the technology sector.

The top five holdings in the Vanguard Information Technology ETF account for 50.8% of the total value of its portfolio, so it's more concentrated than the Vanguard S&P 500 Growth fund. The composition of the top five is very similar between the two ETFs, but Vanguard Information Technology is even more heavily influenced by the performance of just a handful of stocks:

Stock

Vanguard Information Technology ETF Portfolio Weighting

1. Microsoft

17.28%

2. Apple

15.27%

3. Nvidia

11.89%

4. Broadcom

4.40%

5. Salesforce

2.00%

Data source: Vanguard. Portfolio weightings are accurate as of April 30, 2024, and are subject to change.

The higher weighting toward those tech stocks is the source of Vanguard IT's outperformance relative to Vanguard S&P 500 Growth and the S&P 500 (which I'll discuss in a moment). Considering Nvidia's blockbuster gain over the past year, for instance, the fund that holds more Nvidia stock has produced better returns. It's that simple.

On the flip side, Vanguard IT will experience more downside than Vanguard S&P 500 Growth and the S&P 500 if technologies like AI fail to live up to the hype. Even outside of its top five positions, Vanguard IT holds a number of stocks exposed to the success of AI, including Advanced Micro Devices, Oracle, Micron Technology, and Palo Alto Networks, to name just a few.

With that being said, the ETF has delivered a compound annual return of 12.9% since it was launched in 2004, which is better than the 9.7% average annual gain in the S&P 500 over the same period. While AI is the future, Vanguard IT has benefited from the proliferation of other technologies over the last two decades, including the internet, e-commerce, and cloud computing.

Tech trends have accelerated more recently, which is why the Vanguard Information Technology ETF has performed even better over the last 10 years, with a compound annual gain of 19.8%. That compares to a 12.4% yearly gain in the S&P 500.

Simply put, investors seeking a way to beat the S&P 500 over the long term by owning a selection of high-quality technology stocks should look no further than the Vanguard Information Technology ETF -- but they should always be mindful of the risks.