Warren Buffett is known as one of the greatest stock pickers of all time. Of course, he'd argue that he's actually a business picker instead of a stock picker. The businesses he picks, though, tend to translate to good stocks.

The legendary investor doesn't just pick individual stocks -- he also likes some exchange-traded funds (ETFs). Buffett really likes one ETF, in particular. But there's an ETF that's just as good and could help you retire as a millionaire.

Warren Buffett with people in the background.

Image source: The Motley Fool.

Buffett's favorite ETF

There are only two ETFs in Berkshire Hathaway's (BRK.A -0.76%) (BRK.B -0.69%) portfolio: the SPDR S&P 500 ETF Trust (SPY 0.95%) and the Vanguard 500 Index Fund ETF (VOO 1.00%). Both are index ETFs that track the S&P 500.

Which of these two funds is Buffett's favorite? I think the evidence points to the Vanguard 500 Index Fund ETF.

For one thing, Berkshire owns a little more of the Vanguard ETF than it does of the SPDR S&P 500 ETF Trust. At the end of the third quarter, the conglomerate's stake in VOO was worth slightly more than $17.5 billion, while its position in SPY was worth under $17.5 million.

Also, Buffett seemed to express his opinion in his 2013 letter to Berkshire Hathaway shareholders. In that letter, he wrote that he had instructed in his will that most of the fortune inherited by his family be invested in a low-cost S&P 500 index fund. He added, "I suggest Vanguard's."

An alternative that's just as good

Why would Buffett prefer the Vanguard fund to another that owned the same stocks? Cost. Vanguard is well known for its low annual expense fees. In that 2013 letter, he emphasized that it's important to "keep your costs minimal."

VOO certainly beats SPY on this front. The Vanguard fund's annual expense ratio is only 0.03%, compared to 0.0945% for the SPDR ETF.

However, when it comes to cost, there's another alternative that's just as good as VOO. BlackRock's iShares Core S&P 500 ETF (IVV 0.98%) also tracks the S&P 500. Its expense ratio is also 0.03%.

There are only two meaningful differentiators between these two ETFs. One is average trading volume. The average volume for VOO is around 4.8 million shares, while the average volume for IVV is slightly under 5 million shares.

The other is assets under management (AUM). VOO's AUM is around $937 billion, compared to IVV's AUM of nearly $397 billion. Neither of these differences should matter to long-term investors, though.

You can retire as a millionaire with either ETF

Buffett told Berkshire Hathaway shareholders roughly a decade ago that any investor who owns a large, diversified basket of stocks via an S&P index fund is "bound to do well" over time. He was right.

It's possible to retire as a millionaire by investing in VOO or IVV. For example, let's assume that you invest $5,350 per year in either ETF for 30 years. If the S&P 500 delivers the same average annual return of 10.7% as it has over the last 30 years, you'd end the period with a little over $1 million.

The low expense ratio for VOO and IVV wouldn't matter materially to your total returns. Taxes could be a factor, though. However, investing in a tax-protected account, such as an IRA or a 401(k), would solve that problem.

Of course, there's no guarantee that the S&P 500 will deliver the same level of returns going forward as it has in the past. Still, investing regularly in VOO or IVV over a long period is likely to pay off nicely.