# Capital gains on stocks sold to take initial investment off the table

Suppose I have invested \$100K in a stock that was trading at \$100 per share. The stock has gone up by 10 percent and is now at \$110. I sold 909 units at \$110, i.e. 909*\$110 ≈ \$100K, which is practically the same amount as my initial investment.

The remaining 91 stocks are still owned by me.

My question is: during that sale, how much capital gain did I make?

I am thinking \$100K - \$100K = \$0 gains.

Is that correct?

After seeing the responses, I am adding a bit more to the scenario. If I buy 1000 units in 2018 for 100 Dollars a unit. I buy another 1000 units in 2019 for 50 Dollars a unit because the stock has fallen. I sell all the 2000 units in 2019 for a price of 75 Dollars. What would be my capital gain? Zero?

• The way the tax office looks at it, you bought 1000 separate shares, not "one investment". But your example is a simple case. Suppose you buy 1,000 shares in January, another 1,000 in February (at a different price) and then sell 1,500 shares in March. The rules say whether that means you sold all the January shares and half the February, or half the January and all the February. You don't get to choose which way to calculate the tax bill! – alephzero May 14 '19 at 16:23
• @alephzero: Actually, in many cases the investor can issue an order to sell by lot. Often it's advantageous to sell the oldest lot (which is more likely to qualify for long-term capital gains treatment) than the most expensive one (which delays realizing the gain). But in this case, all the possible ways to divide the shares have the same duration and the same purchase price. – Ben Voigt May 14 '19 at 21:31
• "What would be my capital gain? Zero?" Determine the cost of the first two purchases and add them up. Determine the proceeds from the sale. Now subtract the cost from the proceeds and VOILA! , you have the answer. – Bob Baerker May 15 '19 at 21:48
• @Bob Baerker 100K + 50K - 150K =0. – Keerikkattu Chellappan May 16 '19 at 0:26
• @Keerikkattu Chellappan - You know the old expression about teaching a man to fish? Thanks for providing the fish that I already had and didn't need. But someone else needed fishing instructions :->) – Bob Baerker May 16 '19 at 3:21

No, it is not correct.

You bought those 909 shares for \$90,900. You sold them for \$99,990. Your capital gain is \$9,090

Or you could calculate the cap gain by multiplying the share price increase by the number of shares sold:

909 * \$10 = + \$9,090

• Don’t forget to add the cost of the buying the stock to the basis cost and subtract the cost of selling the stock from the value of the sale. If you paid a transaction fee of (say) \$50 to buy and another \$50 to sell, this will reduce your capital gains by \$100. When you sell only a portion of a lot that had a single transaction fee, it is appropriate to apportion the transaction fee based on the percentage of the lot you are selling. – MTA May 14 '19 at 18:37

A term more accurate than "make" is "realize". When you sell an asset, the capital gain realized is the sale price of that asset minus the basis of that asset. The sale price of the shares that you sold was \$99,999. The basis was \$90,900; for the basis, you look at how much you paid for the particular shares that you sold, not how much you've paid for shares in general. Since \$99,999-\$90,000 = \$9,090, you've realized \$9,090 in capital gain.

You have to account for the fact that you still have stocks. So you must break them into lots.

• You have a lot of 909 units, cost basis \$90,900, sale price \$99,990.
• You have a lot of 91 units, cost basis \$9100, held.

The first lot sale was a taxable event of \$9090 gain. The second lot isn't taxable yet.

You're trying to force the lots to be #1 cost basis \$100,000 sale price \$99,990 (taxable event: loss \$10)... and #2 cost basis \$0 held. So effectively you'll take all the capital gains and pay all the tax when you sell the last lot. That's valid as a way to model your assets, but it's not allowed for tax purposes. The government wants to tax the gains when they occur.