In 30 seconds
Selling some shares does not erase the cost of the shares you keep
When only part of a stock position is sold, the basis assigned to the sold shares is used to calculate that sale’s gain or loss. The remaining tax lots keep their own basis. If you later buy more shares, a brokerage may display a blended average purchase price, but the underlying purchases can still remain separate tax lots.
Watch Receipt Check
Episode 2: the leftovers and the stir
The privacy-enhanced YouTube player loads only after you press play. Watch directly on YouTube.
First: what cost basis means
Cost basis is generally what you paid for an investment, including certain purchase costs and later adjustments required by tax rules. When you sell, the difference between the sale proceeds and the basis assigned to the shares sold helps determine the capital gain or loss.
Cost basis is not the current market price. It is not the amount of cash received in the sale. And it is not automatically wiped away when only part of a position is sold.
A simple 10-share example
Imagine buying 10 shares at $10 each in one tax lot. The total basis is $100. If four of those shares are sold and all 10 originally had the same per-share basis, the illustration looks like this:
10 shares × $10
This deliberately simple example assumes one purchase at one price and ignores commissions and later adjustments. With purchases made on different dates or at different prices, identifying the shares sold matters.
The important real-world layer: tax lots
Each purchase of an individual stock can create a separate tax lot with its own acquisition date and basis. When shares are sold, a brokerage needs a method for deciding which lot was sold.
| Term | Plain-English meaning |
|---|---|
| Specific-share identification | You instruct the broker which shares or tax lot to sell and receive confirmation. |
| FIFO | First in, first out: if shares are not adequately identified, the earliest shares are generally treated as sold first. |
| Average basis | A permitted averaging method generally associated with mutual funds and certain dividend-reinvestment shares—not a blanket rule for ordinary individual stocks. |
Inside the pretend fund
What the episode’s Pizza Bytes numbers mean
After the simulated META sale, the portfolio still showed $62.42 of cost attached to the remaining META shares. The sale did not erase the cost of what the pretend fund continued to hold.
When the pretend fund added to Alphabet, Pizza Bytes recalculated its displayed blended purchase average to $300.12. That display is useful for following the paper portfolio, but it is not presented as a replacement for a real broker’s tax-lot accounting.
Open the Pizza Bytes trade ledger to see the simulated transactions behind the lesson.
Quick answers
Cost-basis FAQ
What happens to cost basis when I sell only some shares?
The basis assigned to the shares sold is used for that sale. The unsold tax lots retain their own basis. The result depends on which shares were identified or which default method applied.
Does buying more shares change my cost basis?
The new purchase creates additional basis. A brokerage may show a combined average purchase price, while the underlying individual-stock purchases remain separate tax lots for tax reporting.
Is cost basis the same as the current price?
No. Basis tracks what you paid, with applicable adjustments. Current price reflects what the investment trades for now.
Why does choosing a tax lot matter?
Different lots may have different purchase prices and holding periods, so selecting a different lot can change the gain or loss reported for the sale.
Keep learning
Related Pizza Bytes lessons
Check the source
Authoritative references
- IRS Publication 550: Investment Income and ExpensesBasis of investment property, identification of stock, FIFO, and average basis.
- IRS: Capital gains, losses, and sale of home FAQsHow basis is determined when shares were bought at different times and prices.
Page published Dec. 1, 2026. Education only, not financial or tax advice.