S&P 500 Cost Basis: How to Track Your Index Fund Tax Basis
You buy $10K of VOO every month for 10 years. Your total cost basis is $1.2M. When you sell, you can use specific ID to sell shares with the highest cost basis first — minimizing your capital gains tax. Here's how cost basis works for index fund investors.
Cost basis is the original value of an asset for tax purposes, adjusted for subsequent events like dividends reinvestment, stock splits, and return of capital. For S&P 500 index fund investors who dollar-cost average regularly, tracking cost basis across hundreds of purchase lots can become complex. The IRS requires you to report cost basis when you sell shares, and your cost basis method determines which shares you are selling and how much tax you owe. The good news is that most brokers now track cost basis automatically for covered shares (acquired after 2011 for stocks, 2012 for mutual funds). However, understanding how each method works is essential for minimizing your tax bill. Learn how to pair cost basis strategy with tax-loss harvesting →
Real-world example: You have accumulated 1,000 shares of VOO across 120 monthly purchases. Your lot sizes range from $9,800 to $11,200 due to price fluctuations. In year 11, you need to sell 200 shares to fund a down payment. Under average cost, you use a blended price of $480/share, paying tax on the gain from that average. Under specific identification, you identify the highest-basis lots (purchased during market peaks), potentially reducing your taxable gain by thousands of dollars. The choice of cost basis method is not permanent — the IRS allows you to change methods, but specific identification requires advance designation at the time of the trade. Dollar-cost averaging and basis tracking →
Cost Basis Methods for Index Funds
The IRS allows several cost basis methods for mutual funds and ETFs. Average cost (average cost basis) is the default for mutual funds and calculates the average purchase price across all shares. FIFO (first-in, first-out) assumes you sell the oldest shares first, which typically have the lowest cost basis and therefore the highest capital gain for long-term holders. Specific identification (spec ID) lets you choose exactly which lots to sell, giving you maximum control over your tax outcome. HIFO (highest-in, first-out) selects the highest-cost shares automatically, minimizing gains. LIFO (last-in, first-out) sells the most recently purchased shares first, which is useful if you expect to be in a lower tax bracket in the future. For ETFs, specific identification is generally the most tax-efficient method because ETFs tend to have lower capital gain distributions than mutual funds, and you can select high-basis lots to minimize realized gains. Place funds tax-efficiently across accounts →
How Dividend Reinvestment Affects Cost Basis
When you reinvest dividends in an S&P 500 index fund, each reinvestment creates a new tax lot with its own cost basis. The dividend amount (after tax in a taxable account) purchases fractional shares at the prevailing market price. Over 10 years of monthly investing with dividend reinvestment, a typical S&P 500 investor might accumulate 120+ lots from regular purchases plus another 40-60 lots from quarterly dividend reinvestments. Each lot has a different basis and holding period. Brokers track these lots automatically, but the complexity makes specific identification valuable — you can cherry-pick lots with the highest basis (purchased via reinvestment during market peaks) when you need to sell. In a rising market, reinvested dividends from 3-5 years ago may have the highest basis, so selling those lots first minimizes current-year capital gains. This strategy is called tax lot optimization and many brokers offer it as an automatic service.
Covered vs. Non-Covered Shares
The IRS distinguishes between covered shares (acquired after January 1, 2011 for stocks and ETFs, 2012 for mutual funds) and non-covered shares (acquired before those dates). Brokers are required to report cost basis to the IRS for covered shares but not for non-covered shares. For non-covered shares, you are responsible for tracking your own basis — which may require digging up old account statements or using the average cost method if you cannot determine actual purchase prices. If you have non-covered shares of an S&P 500 fund, consider using specific identification for those lots to maintain maximum flexibility. Many long-term investors who held index funds before 2011 can benefit from simplifying non-covered share tracking by using the average cost method, which is simpler to calculate for mutual funds held before the cost basis reporting rules took effect.
Wash Sale Rules and Cost Basis
The wash sale rule disallows a loss deduction if you buy substantially identical securities within 30 days before or after the sale. For S&P 500 index funds, this means selling VOO at a loss and buying VOO or another S&P 500 fund (like SPY or IVV) within the 30-day window triggers the wash sale rule. When a wash sale occurs, the disallowed loss is added to the cost basis of the replacement shares, effectively deferring the loss rather than eliminating it. This adjustment increases your cost basis on the replacement shares, reducing future taxable gains. For cost basis tracking, wash sale adjustments create complexity because each adjustment modifies the basis of specific lots. Most major brokers (Vanguard, Fidelity, Schwab) automatically track wash sale adjustments, but if you trade across multiple accounts, wash sales may go undetected. Use tax-loss harvesting carefully to avoid creating a trail of basis adjustments. Detailed wash sale rules for index funds →
Which cost basis method is best for S&P 500 ETFs?
Specific identification (Spec ID) is almost always the best method for S&P 500 ETFs in taxable accounts. It gives you the flexibility to sell high-basis lots to minimize gains, or low-basis lots if you want to realize gains during a low-income year. For long-term buy-and-hold investors who rarely sell, the method matters less, but when you do sell (for a home purchase, retirement, or rebalancing), having Spec ID enabled can save thousands in taxes. FIFO is the default for most brokers and typically produces the largest taxable gain because it sells the oldest (lowest-basis) shares first. Average cost is available for mutual funds but not recommended for ETFs because it limits your ability to tax-loss harvest individual lots.
Does cost basis differ between mutual funds and ETFs?
Yes. Mutual funds offer the average cost method, which calculates a single average basis per fund. ETFs, being exchange-traded, do not support average cost — you must use FIFO, LIFO, HIFO, or specific identification. Additionally, mutual funds distribute capital gains annually (which you pay tax on each year), while ETFs rarely distribute gains due to the in-kind creation/redemption mechanism. This difference means ETF cost basis tracking is simpler because you do not have to account for annual capital gain distributions adjusting your basis. However, most brokers offer average cost for mutual funds only, and if you switch from average cost to specific ID for a mutual fund, you must obtain IRS approval or wait for a 12-month period before switching.
How do I track cost basis correctly for tax reporting?
Your broker will issue Form 1099-B each year showing proceeds and cost basis for covered shares sold. You must report this on Schedule D of your tax return. For shares sold using specific identification, your broker must have a written instruction from you identifying which lots to sell before the settlement date. Most brokers allow you to select lots online when placing a trade. If you hold the same fund at multiple brokers, track your aggregate basis separately because each broker only reports on shares held at that institution. For tax-loss harvesting, you can sell specific lots and buy a different S&P 500 fund (e.g., sell VOO, buy IVV) to avoid wash sales while maintaining market exposure.
Can I change cost basis methods after selling shares?
No. You must designate your cost basis method before or at the time of sale, not after. For brokers that allow standing instructions (like "always use Spec ID"), you can set the method in advance and it applies automatically to future trades. If you have been using FIFO and want to switch to specific identification, you can generally do so for future trades, but you cannot retroactively change the method on trades already settled. The IRS allows one change between average cost and specific ID for mutual funds, but you must wait 12 months after selling shares using the new method before switching back.
Related Resources
Tax-Loss Harvesting Guide
Combine cost basis strategy with tax-loss harvesting to minimize your annual tax bill on index fund investments.
Dollar-Cost Averaging Guide
Understand how regular investing creates multiple tax lots and how to manage cost basis across hundreds of purchases.
Wash Sale Rule Guide
Learn how wash sale rules interact with cost basis adjustments when tax-loss harvesting S&P 500 index funds.