Let's say I buy 10 shares of Google in April and then 10 more in May. If I decide to sell 10 of those 20 shares in June, what base share price do I use to calculate my capital gains? Can I choose which price to use as long as I make sure to use the other price when I sell off the other 10? Or is there some sort of first-in first-out rule?

I'm also interested in whether the answer is any different if we are discussing cryptocurrency.

1 Answer 1



How do I figure the cost basis when the shares I'm selling were purchased at various times and at different prices?


The basis of stocks or bonds you own generally is the purchase price plus the costs of purchase, such as commissions and recording or transfer fees. When selling securities, you should be able to identify the specific shares you are selling.

If you can identify which shares of stock you sold, your basis generally is:

What you paid for the shares sold plus any costs of purchase. If you can't adequately identify the shares you sold and you bought the shares at various times for different prices, the basis of the stock sold is:

The basis of the shares you acquired first, then the basis of the stock later acquired, and so forth (first-in first-out). Except for certain mutual fund shares and certain dividend reinvestment plans, you can't use the average basis per share to figure gain or loss on the sale of stock.


  • And IRS treats cryptocurrency as property, not currency, so yes the rules and process for cryptocurrency are the same. Except that US stockbrokers have like 20 years practice providing you basis information and handling the options (which used to allow LIFO, and two methods of averaging, as well as FIFO and specific), but cryptocurrency exchanges may not. Apr 30, 2018 at 0:28

You must log in to answer this question.

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