Identifying Shares You Sell 

A procedure that can reduce your tax bill

By Kaye A. Thomas
Updated June 25, 2007

You need to act at the time you sell, not later when you prepare your tax return.

You may own shares of stock in a single company that were acquired at different times and at different prices. If you decide to sell some of these shares, it's important to know which shares you sold. The answer can affect how much gain or loss you report, and whether the gain or loss is short-term or long-term.

If you're on top of the rules — and your broker cooperates — you can choose which shares to sell. You might choose the shares with the highest basis (the ones that cost the most) to reduce the amount of gain you'll report. If you have a loss, you might choose the newer shares in order to report a short-term loss. Choose wisely and you'll reduce your taxes. But you have to follow the rules described below if you want your choice to stick.

These rules are not difficult, but often misunderstood. Even the brokers tend to be confused by them. Make sure you understand them, so your broker's ignorance won't cost you tax dollars.

Mutual Funds: The rules described on this page apply to sales of mutual fund shares — but only if you haven't elected to use one of the special averaging methods for shares in that mutual fund account. We explain averaging for mutual fund shares in Selling Mutual Fund Shares.


It's useful to understand the theory of the rule before you understand the rule. The tax law permits you to decide what shares you want to sell. But you have to make that choice at the time of the sale. You can't go back later, after you see how things turn out for the year, and say you really meant to sell different shares. The rules for identifying shares are designed to do two things:

  • Provide a rule for what happens if you didn't make any choice at the time of the sale, and
  • Provide a way for you to make a choice at that time — and documentation of that choice.

If You Don't Choose

If you don't specify which shares you are selling, the law treats you as if you sold the earliest shares you bought.

Example: You bought 50 shares of XYZ at $40 in 2004 and another 50 at $60 in 2005. In 2007 you sell 50 shares at $65 without specifying which shares you are selling. You're treated as selling the shares you bought in 2004.

Notice that you would report a smaller amount of gain if you specified that you were selling the shares you bought in 2005. Sometimes it pays to choose which shares you're selling.

Q: Can't I just use the average basis of the stock I bought, treating all shares as having a basis of $50?

A: No. There are basis averaging rules for shares of mutual funds but not for regular stocks.

Q: I sold some of this stock before and didn't identify the shares I sold. Does this mean I'm locked into using the rule where I'm selling the earliest shares I bought?

A: No, this rule applies to each individual sale. You're permitted to identify shares for a current sale even if you failed to identify shares from the same stock in the past. (Note, however, that if you elect averaging for mutual fund shares you're locked into that method for all shares of the same mutual fund.)

If You Hold Certificates

Shares of stock are represented by certificates. It used to be commonplace (and is still not entirely unusual) for investors to hold certificates for their shares. Most investors nowadays leave the certificates with the broker.

If you hold certificates for your shares, the way you choose which shares you're selling is to deliver the certificate that represents those shares. No further steps are required to identify the shares in this situation. It's your responsibility to determine which certificate represents the shares you want to sell and deliver that certificate. It won't help to tell the broker (or the IRS) you meant to sell some other shares if you deliver the wrong certificate.

It's possible you'll end up holding a single certificate that represents shares bought at different times or different prices. In that case, assuming you're using a broker to sell the shares, you need to identify the shares you're selling (as explained below) when you deliver the certificate to the broker. If you sell some of the stock represented by a certificate without using a broker or other agent, you simply have to maintain a written record of which shares you sold.

How to Identify Shares

Now we come to the meat of the question. You left your shares with your broker and you want to sell some but not all of them. To identify the shares you're selling you need to do two things:

  • At the time of the transfer, specify to the broker the shares you are selling, and
  • Within a reasonable time thereafter, receive a written confirmation of that specification from your broker.

Clearing the Air

Before we go another step let's clear up the biggest point of confusion. The traditional way to specify the shares you're selling is in the form of an instruction to your broker:

Sell 50 shares XYZ from the lot purchased on March 12, 2005.

This makes it sound like the broker has to do something special — possibly locate those specific shares, or at least make a record of some kind indicating what shares you sold. Some brokers will tell you "we don't offer that service." But in reality the only thing the broker has to do, besides executing the sale transaction in the normal way, is send you a written confirmation that you specified shares from the lot purchased on March 12, 2005.

Only part of the message shown above is really an instruction. "Sell 50 shares XYZ" is an instruction. The rest of the message is there for the sole purpose of establishing proof acceptable to the IRS that you made a choice at the time of the sale. Your broker doesn't have to do anything about the second part of the message — except provide written confirmation that they received it.

Specifying the Shares

When you specify the shares to be sold, you need to identify the shares in a way that makes it clear which shares you sold. Any of the following might do the trick:

  • The shares I bought on March 12, 2005.
  • The shares I bought for 40-3/8.
  • The shares I bought most recently.

It doesn't matter if the instruction is meaningless to the broker. For example, you may have had a different broker when you bought the shares, so the present broker has no idea what shares you bought on March 12, 2005. The thing that does matter is that your choice is objective and unambiguous, so you can prove to the IRS which shares you sold.

If you do your trading online, you may find that there's no apparent way to give instructions as to which shares you're selling. If you're in this situation, it should be acceptable if you send an email at the same time as your order, saying something like this:

My sale order # 123456 pertains to shares purchased on March 12, 2005. Please acknowledge in writing that you received this message at the time of the sale.

Be careful not to send an email that can be misinterpreted as an additional sale order.

Q: Can I make an oral identification — for example, over the telephone?

A: Yes. There's no requirement that your identification be in writing. But the broker's confirmation of your identification must be in writing.

Broker's Confirmation

The second requirement is that you receive written confirmation of the identification from the broker within a reasonable time after the transaction. Remember, they're merely confirming your message. They don't have to confirm that they actually sold those specific shares. All you need is written confirmation that you identified the stock at the time of the sale.

Example: Your broker sends you a message stating "We acknowledge that you identified the 500 shares of XYZ sold on May 18, 2007 as shares purchased on March 12, 2005."

That's it! You need that in writing from your broker within a reasonable time after the sale, for the simple reason that it provides a contemporaneous record from an independent third party of your choice of which shares to sell. In other words, it proves you didn't wait until later to see how things turned out before choosing which shares you sold. Even if the IRS could prove that the broker didn't sell the same shares you bought March 12, 2005 it wouldn't matter. The important thing is that you identified the shares and received confirmation. That's enough to satisfy the test.

Q: Is an email confirmation from my broker good enough?

A: There's no official guidance on whether this constitutes a written document for this purpose, but given the strict requirements for brokers to maintain records of email communications it should be acceptable.

Note: One taxpayer won a case where all of the communications were oral, and there was no written confirmation from the broker. We think the result in this case is questionable, so you wouldn't be wise to rely on it.

Blanket Instructions

Some advisors suggest that you can give your broker a blanket instruction, such as "always sell the shares with the highest basis." If you have written confirmation of such an instruction from your broker it should stand up in court, even though the regulations don't say anything about this procedure. But there may be times when you want to use a different approach. For example, it may be better to sell the shares with a lower basis because they produce long-term gain instead of short-term gain. You may get better tax results if you make a specific identification each time you sell some but not all of the shares you hold in a particular company.