Warren Buffett built Berkshire Hathaway's $347 billion portfolio thanks to investments in a variety of industries, from financials to consumer goods players. Though Buffett's biggest position is in technology giant Apple, the billionaire investor doesn't generally invest in technology companies. He holds a strong belief in investing in what he thoroughly understands, so he won't rush into the latest hot-tech stock out of a fear of missing out.

But even though Buffett's portfolio may seem to lack technology stocks, he actually has placed a bet on the biggest ones. Buffett is invested in stocks known as the "Magnificent Seven," referencing the 1960 Western by the same name. These companies -- Apple, Amazon, Alphabet, Microsoft, Meta Platforms, Nvidia, and Tesla -- are all leaders in their industries and have delivered enormous gains in recent years.

Let's find out exactly how Buffett has invested in all of these top tech players -- without directly buying their shares.

Warren Buffett is shown at an event.

Image source: The Motley Fool.

A simple, low-risk Buffett investment

This Buffett investment is simple, allows him to benefit from some of today's hottest stocks, and involves very little risk. The Oracle of Omaha has gained exposure to the Magnificent Seven through his positions in two funds that track the S&P 500: the SPDR S&P 500 ETF Trust (SPY 0.95%) and the Vanguard S&P 500 ETF (VOO 1.00%).

These funds mirror the composition of the S&P 500, an index that includes the country's biggest companies, and its components have changed over time as different companies and industries have gained or lost strength.

Today, these companies powering the U.S. economy just so happen to be in the area of technology, led by the Magnificent Seven. Information technology stocks make up 30% of the index and the funds tracking it -- and all of the Magnificent Seven stocks are among the most heavily weighted stocks in the index. Therefore, they are among the top holdings in the funds.

So, by owning shares of these index funds, Buffett is benefiting from these tech stocks' strong performance but is much less exposed to the risk of heavily investing in just one or two. This is the beauty of an index fund: It offers an investor the opportunity to take part in the successes of the market's hottest companies, but at the same time, if one of those companies suffers, the investor's portfolio won't necessarily suffer. That's because the fund's performance depends on many stocks, and this diversification limits risk.

Though Buffett has built much of his success through stock picking, he combines this strategy with an investment in S&P 500 index funds to offer himself exposure to a broad range of companies that he might not have bought individually. But together, these companies are likely to boost a portfolio's performance over time. A look at the S&P 500's historical performance is proof of that, with the index always rebounding and gaining after any past bear market.

^SPX Chart

^SPX data by YCharts.

What does this mean for you?

So, what does this mean for you as an investor? You may already have invested in some or all of the Magnificent Seven stocks, or you may be a cautious investor who has shied away from any high-flying tech stocks. In either case, if you have funds to invest right now, you could benefit from following Buffett into an S&P 500 index fund.

This sort of holding is Buffett approved, not only for his own portfolio but for the portfolios of non-professional investors.

The non-professional should "own a cross-section of businesses that in aggregate are bound to do well," Buffett wrote in his 2013 letter to Berkshire Hathaway shareholders. "A low-cost S&P 500 index fund will achieve this goal."

All of this means you don't have to be a technology expert to invest in the Magnificent Seven, and you don't have to be an aggressive investor either. An S&P 500 index fund suits any investment style. And today, like Buffett, by going this route, you could benefit from the promising future of the Magnificent Seven -- while keeping risk at a minimum.