I buy 100 shares of Company A at $10/share and one month later I buy 100 more shares of Company A at $20/share. If one month later, I sell half of my shares how would I calculate my profit? I understand my profit if I sold all of my shares, but not if I'm only selling half of my shares. For example on E*Trade I can't specify which shares I'm selling. I don't know how to calculate my profits.

Month 0: 100 Shares at $10
Month 1: 100 Shares at $10 and 100 Shares at $20
Month 2:  X  Shares at $10 and  X  Shares at $20

profit = (Sell Price - Buy Price)*Number of Share

  • Go into your etrade settings and enable picking your tax lots. Change it from FIFO or LIFO to 'Specific Lots' in the drop down. use the contact button to get customer service if you can't find it. investopedia.com/articles/05/taxlots.asp Jul 1, 2015 at 23:52
  • 2
    What country are you in? How you calculate your gains for tax purposes depends on where you are located. We do it different in Canada than in the U.S., for instance. Jul 2, 2015 at 2:27

2 Answers 2


Answering for US taxes: There are a couple of different methods for calculating cost basis, and hence profit. Whichever method you choose, stick with it consistently, and you shouldn't have issues with the IRS. These methods are:

  • FIFO (First In First Out)
  • LIFO (Last In First Out)
  • Average

Each has its advantages and disadvantages, but as long as you don't dodge taxes by switching between them mid-stream, it's arbitrarily up to you which one you use.

FIFO is the most common method for accounting, the cost basis of the share being sold is the cost paid for the 'oldest' share in your account. Hence, if you sell 120 shares in your example, your cost basis is 1400 (100*10 + 20*20).

LIFO is based on the newest share price, and is used when you want to claim short term losses on a long term account. Remember though, that you can't switch between methods partway through without targeting yourself for an audit. Here, if you sell 120 shares, your cost basis is 2200 (100*20 + 20*10).

The last method keeps a running average cost basis per share, and is calculated by the total amount paid divided by the total number of shares. For example, in month 0 your cost basis is 10 (1000 / 100). In month 1 you increase your cost basis to 15 (3000 / 200). Selling 120 shares, your cost basis is 1800 (120*15). This gets complicated if you're consistently buying and selling, however.


This may seem like a fairly simple question, but it can be confusing if you fail to break it down into the proper steps. Stock trades generate dollar profits and/or losses, which are measured in percentages. Let's use a simple example to illustrate:

Suppose an investor buys 100 shares of Cory's Tequila Company (CTC) at $10/share for a total investment is $1,000. Now suppose two months later the investor sells the 100 CTC shares for $17/share. They receive $1,700, and their profit for the trade is $700.

A profit of $700, however, means very little to an investor, unless they know how large of an investment was required to earn that $700. For example, suppose the investor had also bought 1,000 shares in Rob's Sake Distillers (RSD) at $10 apiece (for a total investment of $10,000), and later sold the 1,000 shares at $10.70 each per share, or for a total $10,700. With this trade, they would have profited by $700, yet it took ten times the investment compared to CTC to earn it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .