Capital gains, dividends and cost basis
We follow one investor who bought a stock fund for $40,000 and sold it for $65,000, and show how the holding period, the 2026 rate thresholds, and the 3.8% investment income tax change the bill. Then we look at dividends: a fund paying 1.04% (Vanguard Total Stock Market ETF (VTI) yield, ttm) in yearly dividends, mostly taxed at the same low rates as long-term gains.
Today’s figures in this lesson
Gains are taxed when you sell, by how long you held
Buy a fund for $40,000; sell for $65,000. The gain is $25,000.
- Held 11 months: short-term. For a married couple in the 24% bracket, federal tax is about $6,000.
- Held 13 months: long-term. At the 15% rate, federal tax is about $3,750.
Same investment, same profit, about $2,250 less tax for waiting two months. A long-term gain is also stacked on top of ordinary income, so part of it may land in the 0% band if your other taxable income is low.
The 2026 rate bands, and the 0% opportunity
A retired couple, both over 65, have $70,000 of pension and IRA income and take deductions of about $47,500, so their taxable income is about $22,500.
- Room left in the 0% band: $98,900 − $22,500 = $76,400.
- They could realize up to about $76,400 of long-term gains at 0% federal tax.
- Caution: higher income can raise the taxable part of Social Security benefits and Medicare premiums two years later. See Medicare's high-income surcharge (IRMAA) (Level 68).
Cost basis: the record that saves you tax
A fund bought for $20,000 has paid and reinvested $6,000 of dividends over the years. You sell it for $40,000.
- Correct basis: $20,000 + $6,000 = $26,000. Gain: $14,000.
- If you forget the reinvested dividends: gain looks like $20,000, and you overpay tax on $6,000 you were already taxed on as dividends.
When you sell part of a holding, the lot you sell matters too. Choosing the shares with the highest cost (“specific identification”) gives the smallest gain.
Dividends, losses and the special rates
The S&P 500 yields (not shown here: licensed data) in dividends today. Those dividends are mostly , so a couple in the 15% band pays 15% federal tax on them rather than the 22% or 24% they would pay on the same amount of bank interest.
A loss example: you realize a $10,000 loss and no gains. You deduct $3,000 this year and carry $7,000 forward. Collectibles such as coins and art face a top federal rate of 28% on long-term gains.
Check your understanding
Three questions. “Not sure” is a fine answer; every answer shows why.
Question 1 of 3
You bought shares on March 3, 2025 and sell them at a gain on March 3, 2026. How is the gain treated?
Question 2 of 3
You reinvested $5,000 of dividends in a fund over the years. When you sell, those reinvested dividends:
Question 3 of 3
You have a $12,000 net capital loss this year and no gains. How much can you deduct against other income this year?
Not marked as read yet
Try it with your numbers
Watch it
Add a live figure from this lesson to your dashboard.
Where to go next
Figures in this lesson
- sp500-dividend-yield Loading
- vti Loading
Sources
- IRS: Topic 409, Capital gains and losses · checked Oct 12, 2026
- IRS: Revenue Procedure 2025-32 (2026 capital gain thresholds) · checked Oct 12, 2026
- IRS: Topic 559, Net investment income tax · checked Oct 12, 2026
- IRS: Gifts and inheritances FAQ (basis of inherited property) · checked Oct 12, 2026
- IRS: Publication 550, Investment income and expenses · checked Oct 12, 2026
Educational information, not advice. Figures are dated and sourced; check with a tax or financial professional before acting. Drafted Oct 12, 2026 · human review pending.
Figures on this page
Each figure as published, with its as-of date and source. This copy of the page was prepared on Oct 14, 2026; the live page shows the newest figures.
| Figure | Value | As of | Source |
|---|---|---|---|
| Vanguard Total Stock Market ETF (VTI) yield, ttm | 1.04% | Oct 12, 2026 | StockAnalysis |
| S&P 500 dividend yield | Not available (withheld by licence (S&P Dow Jones Indices)) | date not recorded | S&P Dow Jones Indices (licensed; not republished here) |