# Average cost basis for tax

Trying to understand how average cost basis works. What I didn't find is if after a sale the computation of cost basis will change for a security: I calculate the cost basis as average cost during all periods I bought the security and any time a new buy happens I have a new basis.

But when I sell securities do I have to take out the sold shared from my history of transactions in FIFO order ? (e.g. I sold 10 shares from january of 2020, from now on the cost basis will not take those 10 oldest shares into account ?)

• Tax questions need a country tag because the rules vary from place to place. Calculating capital gains taxes is one of the things that would certainly depend on your country. – Chris W. Rea Mar 4 at 21:16

Since no country was specified, this is a US centric answer:

Suppose over time you make multiple purchases for a different number of shares at different prices. You have acquired a total of 100 shares for a total cost of $5,000. Your average cost$50.00 per share. Only a new purchase at a different price (not $50) will change that. You now sell 10 shares at$60, receiving $600. Your gain is$10 per share and the taxable amount is $100 (non sheltered account). You now own 90 shares with an average cost of$50 per share.

The tricky part is keeping track of the holding period of the shares remaining. Your shares are considered to be sold in the order you acquired them. If the first 10 shares were bought more than a year ago, it's a long term gain. If less than a year, short term. If more and less then it's a mix, apportioned accordingly.

And once you have used the average cost method, your shares remain averaged for future transactions.

• Thanks for the response. I'm from Romania, legislation only mentiones the method name and the algorithm sounds the same. We don't have to track duration as it doesn't matter. Try to clarify "And once you have used the average cost method, your shares remain averaged for future transactions". But when I sell in FIFO order the remaining shares I own average cost usually changes. How can we say my shares remain averaged after a sell. Don't I need to recompute cost basis for the remaining ones ? Edit: see my new comment bellow – Ghita Mar 5 at 8:34
• Using the average cost method ignores the actual cost basis of the shares sold but instead uses the average cost of all shares purchased. In this regard, FIFO only applies to the order that shares sold are removed from the group. It does not refer to their actual cost basis. Therefore, there is no new computation of cost basis of the remaining shares. If this isn't clear, google for some explanatory articles. – Bob Baerker Mar 5 at 12:54
• Bob Baker, I tried to use it but there is no explanation what happens after a sell, you also didn't say in your response what is the cost basis after a sell (all your shares were same cost - in that case cost basis remains same regardless) – Ghita Mar 5 at 14:07
• I can only repeat what has already been said. Once you opt for average cost, only new purchases changes that. If no new purchase is made, the cost basis remains the same despite the sale. It doesn't matter what you paid for any individual position. Their cost is now the average cost. You don't recalculate cost basis after a sale. You just remove "X" number of shares sold. If you don't have long and short term cap gains in Romania then ignore this aspect. Per my example, if no new purchases, with a $50 cost basis, everything sold at a later date will have a$50 cost basis. – Bob Baerker Mar 5 at 15:01
• Bob Baerker. That is great. I understand now why cost basis remains the same.when I add a new buy I just average with previous cost basis (total outstanding shares * previous cost basis + new shares total cost, everything divided by all current shares count ?). In this case I only need to adjust current number of shares I own (get rid off sold ones from future averages) – Ghita Mar 5 at 17:26