Skip to content

Tax Alert

Tax Gains and Losses: Know Your Options When Selling Securities

Geopolitical risks, reciprocal tariff proposals, interest rate and tax law concerns, and other market uncertainties have rocked the stock market in the first half of 2025. With timely securities sales, you may have opportunities to offset capital gains with capital losses (or vice versa).

When selling securities, knowing the “tax basis” of the shares is essential to determine your gain or loss for federal income tax purposes. If you acquired multiple blocks of the same securities at different times and prices, the IRS typically relies on a default method for calculating tax basis. However, opting for the “specific identification” method could improve your tax results.

Basic Rules

When you sell securities, you realize a capital gain if the price paid for the shares is more than your tax basis. Conversely, you realize a loss if you sell shares for less than your tax basis. Tax basis is essentially a share’s initial cost.

Gains and losses are either long-term or short-term, depending on the holding period. To qualify as a long-term gain or loss, you must have owned the securities for longer than one year (absent a special exception). For these purposes, you generally count from the day after the date you acquired the securities through the date you sell the securities.

When you file your tax return, you must deduct long-term losses from long-term gains. Then you must deduct short-term losses from short-term gains. Next, you must combine your net long-term gain or loss with your net short-term gain or loss. The final amount is reported on your individual tax return.

To offset capital gains from earlier in the year — especially highly-taxed short-term gains — you may “harvest” losses up to the amount of the gains. Any excess can offset up to $3,000 of ordinary income, including W-2 wages, before it’s carried over indefinitely. Alternatively, you might use capital gains to absorb losses recognized earlier in the year.

Short-term gains are taxed at ordinary income rates. Long-term capital gains are taxed at more favorable rates. (See “Current Tax Rates on Short and Long-Term Gains” below.) Investors might prefer to harvest capital gains at year end, especially long-term ones.

Reporting Conundrum

Generally, you can rely on financial institutions to determine your tax basis for computing capital gains or losses. However, other information may be needed.

It’s not unusual for an investor to buy the same securities at different times and prices. For example, Beth purchased shares of a technology start-up in the following three blocks:

  • 100 shares at $10 per share in 2021,
  • 100 shares at $12 per share in 2022, and
  • 100 shares at $50 per share in 2023.

If Beth sells 100 shares of the company’s stock in 2025, which block should she use to compute her tax basis in the sold shares?

Absent any other circumstances, the IRS will treat the first block of shares purchased as the first block sold. This first-in, first-out (FIFO) method is the default if the investor doesn’t indicate otherwise. However, investors can specifically identify the shares being sold rather than using the FIFO method. This requires them to spell out definitive instructions to their brokers.

The specification identification method can provide tax-saving opportunities to investors who closely track their portfolios. To take advantage of this alternative method, you must stay on your toes as the year unwinds.

It’s also important to watch out for the wash sale rule: You can’t claim a loss on the sale of securities if you acquire “substantially identical” securities within 30 days of the sale. Contact your tax advisor for more details.

3 Examples

Investors generally benefit from identifying the shares with the highest basis and using them to minimize their taxable gains or increase deductible losses on sales. However, there are some exceptions.

1. When you’ve recognized other capital gains in the tax year. To illustrate, let’s say Adam buys shares of Numero Uno stock in three blocks:

  • 100 shares at $10 per share in 2021,
  • 500 shares at $5 per share in 2022, and
  • 100 shares at $20 per share in 2023.

Suppose he sells 100 shares of Numero Uno for $12 per share, and he wants to harvest a loss to offset other capital gains in 2025. If Adam uses the FIFO method, he’ll report a long-term capital gain of $200 from selling his Numero Uno stock ($1,200 minus $1,000). However, if he identifies the sold shares as those purchased in the third block for $20 per share, he’ll report an $800 long-term loss ($1,200 minus $2,000). This loss could offset other capital gains incurred during the year.

2. When you’ve incurred prior losses in the tax year. Charlene buys shares of Numero Dos stock in three blocks:

  • 100 shares at $10 per share in 2021,
  • 500 shares at $5 per share in 2022, and
  • 100 shares at $12 per share in 2023.

Suppose she sells 100 shares of Numero Dos for $8 per share, and she wants to harvest a capital gain to absorb other losses from earlier in 2025. If Charlene uses the FIFO method, she’ll report a long-term loss of $200 from selling the Numero Dos stock ($800 minus $1,000). However, if she identifies the sold shares as those purchased in the second block for $5 per share, she’ll report a $300 long-term capital gain ($800 minus $500). Then the long-term gain could offset her prior loss incurred in 2025.

3. When you want to take advantage of favorable long-term capital gains tax rate. Danny buys shares of Numero Tres stock in three blocks:

  • 100 shares at $25 per share in 2021,
  • 500 shares at $15 per share in 2023, and
  • 100 shares at $12 per share in January 2025.

Suppose he sells 100 shares of Numero Tres for $20 per share in May 2025, and he wants to harvest a long-term capital gain to maximize the favorable tax rate. Using the FIFO method, he’d report a long-term loss of $500 from selling the Numero Tres stock ($2,000 minus $2,500). However, if he identifies the sold shares as those purchased in the second block for $15 per share, he’ll report a $500 long-term capital gain ($2,000 minus $1,500). This amount would be taxed at the favorable long-term capital gains tax rate.

Important: Although the third block of Danny’s shares has a lower tax basis than the second block, he has held those shares for less than one year. Identifying the sold shares as those purchased in the third block would generate a higher-taxed short-term gain.

Right Option for You

When selling securities, investors can take steps to optimize their tax results. Sometimes the more straightforward FIFO method provides the greatest benefit, but other situations may call for more tax reporting finesse. If you want to unload securities in today’s turbulent markets, work with your Isdaner tax advisor to understand your options and determine which method makes sense for your situation.