What part of a stock sale is taxed?
You are taxed on your gain, not on the sale price. For a U.S. stock sale, start with the amount you received and subtract your adjusted basis, which is roughly what the shares cost you. A positive result is a capital gain; a negative result is a capital loss.1
Say your net sale proceeds are $1,300 and the shares’ adjusted basis is $1,000. The difference is a $300 gain before any tax is worked out. The full $1,300 is not profit, and the $300 is not the tax bill either.
Hypothetical: from sale proceeds to taxable gain
Move the net sale proceeds in the calculator while the adjusted basis stays at $1,000, and the result switches between a gain, a loss and zero. It shows the first step only, not a tax bill.
A price rise while you still own the shares is generally unrealized, which means it is not taxed yet. A sale or another relevant event changes that. Dividends are different again: they can create taxable income without any sale, so “I did not sell” is not a complete tax check.
Why your basis may differ from the purchase price
U.S. stock basis can include purchase commissions and other acquisition costs. Gifts, inheritances and later adjustments follow their own rules.2 In the example above, the $1,000 basis already includes costs and the $1,300 is already net, so a cost is never subtracted twice.
Proceeds, gain and tax owed are three different amounts.


