Skip to main content
Dollar-Cost Averaging Plan

DCA and Tax-Lot Tracking

Pomegra Learn

DCA and Tax-Lot Tracking

Dollar-cost averaging creates dozens of purchase lots at different prices. Choosing which shares to sell when you need cash—specific identification, FIFO, or HIFO—can save thousands in taxes. The IRS lets you choose your method; smart investors use this to their advantage.

Key takeaways

  • Every DCA purchase creates a separate tax lot with its own cost basis and holding-period clock.
  • Specific identification lets you choose which lots to sell, minimizing tax liability and maximizing control.
  • FIFO (sell oldest first) is simple but often wasteful; HIFO (sell highest-cost first) is tax-efficient for DCA.
  • A 30-year DCA investor might accumulate 360 tax lots in a single fund; tracking requires software.
  • Tax-loss harvesting pairs perfectly with DCA to offset gains and reduce realized gains to zero.

The anatomy of a tax lot

Every purchase is a separate tax lot. In January 2025, you buy $500 of VTI at $295/share (1.69 shares). In February 2025, you buy $500 of VTI at $300/share (1.67 shares). In March 2025, you buy $500 of VTI at $290/share (1.72 shares). Now you own 5.08 shares of VTI—but those shares came from three different purchases with three different cost bases and three different acquisition dates.

Each lot has a holding period. The January purchase reached long-term holding (12 months) in January 2026. The February purchase reached long-term in February 2026. The March purchase reached long-term in March 2026. Capital gains taxed at the long-term rate (15% for most investors, 20% for high earners) are far cheaper than short-term rates (ordinary income tax, up to 37%).

The cost basis of each lot determines your gain or loss when you sell. If you bought at $295 in January and VTI is now at $350, your January lot shows a gain of $55/share. If you sell that lot, you owe capital gains tax on the entire gain. If you sell the February lot instead (cost basis $300), your gain is only $50/share—saving you $5 per share in taxable gains.

A 30-year DCA investor contributing $500/month accumulates 360 tax lots. Managing this manually with a spreadsheet is error-prone and tedious. The IRS allows it. Most brokers track it automatically in their cost-basis reports.

Specific identification: the power to choose

Specific identification means you specify, at the time of sale, exactly which tax lots to sell. You say to your broker: "Sell 5 shares from the January 2025 purchase, 3 shares from the March 2025 purchase, and 2 shares from the May 2026 purchase." Your broker executes the sale using the cost bases of those specific lots.

This power is invaluable for DCA portfolios in taxable accounts. If you need $2,000 in cash, you could sell 6 shares of VTI at $330/share. But which 6 shares? If you use specific identification, you sell the 6 shares with the highest cost basis (the ones with the smallest gains). This is HIFO: highest in, first out.

Example: You have accumulated VTI shares at cost bases of $280, $285, $290, $295, $300, $305, and $310. You need $2,000. Selling 6 shares at current price $330:

  • With FIFO (oldest first), you sell the $280, $285, $290, $295, $300, $305 lots. Your gains total $270 ($50+$45+$40+$35+$30+$25). Tax at 15% = $40.50.
  • With HIFO (highest cost first), you sell the $310, $305, $300, $295, $290, $285 lots. Your gains total $150 ($20+$25+$30+$35+$40+$45). Tax at 15% = $22.50.

HIFO saves $18 on one transaction. Over 30 years, with dozens of sales, HIFO saves thousands.

FIFO: the default method

If you do not specify a method, the IRS assumes FIFO: first in, first out. You sell the oldest shares first. This is simple and automatic, but it is often tax-inefficient for DCA portfolios that have appreciated over decades.

FIFO made sense in an era when most households held a handful of stocks bought over a few years. They bought IBM in 1980, held it for 20 years, then sold it. All shares were roughly the same cost basis. Selling the oldest first was reasonable.

For DCA, FIFO is often suboptimal. You have oldest shares with high gains and newer shares with low gains. FIFO forces you to realize the largest gains. You owe more tax than necessary.

Some investors deliberately choose FIFO for simplicity. They do not want to track lots. They do not want to make decisions. They say: "Oldest out, no thinking required." This is a valid choice, but it has a tax cost.

HIFO: tax-efficient selling for DCA

HIFO is the opposite: sell the highest-cost shares first. For a DCA portfolio, this means selling the shares purchased most recently at the highest prices, minimizing your realized gains.

HIFO requires specific identification and careful record-keeping. But it is legal, and the IRS allows it in retirement accounts and taxable accounts. You must inform your broker at the time of sale which lots you are selling.

Example: Over 10 years, you dollar-cost-averaged $50,000 into a taxable VTSAX account (Vanguard Total Stock Market Fund). You never sold anything. Now your account is worth $100,000, and you need $10,000 in cash. You are selling 5% of your holdings at a market price of $100,000. But which shares?

With FIFO, you sell your oldest shares, which cost an average of $30,000 on $50,000 contributed. You might realize $20,000 in gains. At 15% tax, you owe $3,000.

With HIFO, you sell the most recent shares, which cost an average of $45,000 on the $50,000 you contributed. You realize only $5,000 in gains. At 15% tax, you owe $750.

HIFO saves $2,250 on one withdrawal. For a 30-year investor making periodic withdrawals to fund a sabbatical, pay down debt, or fund a home purchase, HIFO is worth thousands in tax savings.

Average-cost method: simplicity over precision

A third option is average-cost basis: assume all your shares have the same cost, the average of all your purchases. If you invested $50,000 over 10 years and now have $100,000 in value, your average cost per dollar is $0.50. If you sell $10,000 worth, you assume $5,000 of that is cost basis and $5,000 is gain.

Average-cost is rarely optimal. It treats all shares the same, ignoring the reality that some purchases were expensive and some were cheap. For a true DCA portfolio with purchases across different market cycles, average-cost is usually worse than both FIFO and HIFO.

The only advantage to average-cost is simplicity. You do not track individual lots. But most modern brokers track this automatically, so the simplicity advantage has disappeared. Unless you are managing a very small account with just a handful of purchases, avoid average-cost.

Tax-loss harvesting in DCA

Tax-loss harvesting is the practice of selling a position at a loss to realize the loss for tax purposes, then immediately buying a similar position to maintain your market exposure.

Example: You have been dollar-cost-averaging VTI. In December 2024, VTI has fallen 15% from your average cost. You have $8,000 in unrealized losses. You sell the VTI at a loss, realizing an $8,000 loss. This loss can offset $8,000 of capital gains from other investments, or (if you have no gains) offset up to $3,000 of ordinary income, with the rest carried forward.

Immediately after selling, you buy VTSAX (another total-market fund tracking the same index) or a similar replacement. You maintain your market exposure without triggering a wash sale (which would disallow the loss). Over the next few months, DCA continues into VTSAX instead of VTI. Eventually, the loss you harvested reduces your overall tax burden.

DCA portfolios are excellent candidates for tax-loss harvesting because the recurring purchases create regular opportunities to harvest losses during market downturns. A 2022 investor with a decade of DCA purchases likely had positions with significant losses during the bear market. Harvesting those losses saved thousands in taxes.

Tracking software and broker records

Modern brokers automatically track cost basis and provide cost-basis reports for tax purposes. Vanguard, Fidelity, and Charles Schwab all offer this. You can download your cost-basis report, forward it to your accountant, and let your accountant handle the lot tracking.

For investors who want to optimize with HIFO, specialized software like Sharesight or Personal Capital can track lots and model which lots to sell for the best tax outcome. These tools are worth the subscription fee if you are making regular withdrawals from a large taxable account.

If you are selling just once or twice, ask your broker to execute specific identification with HIFO in mind. Tell them: "I want to sell $10,000 of the shares with the highest cost basis." Most brokers can do this.

Decision tree: choosing your lot method

Next

The question of tracking tax lots leads naturally to a technical innovation that has made DCA accessible to smaller accounts: fractional shares allow you to invest exact dollar amounts instead of whole-share quantities, multiplying the granularity of your DCA contributions.