Capital Gain
A capital gain is profit realized from the sale or exchange of a capital asset — the difference between sale proceeds and adjusted cost basis. Short-term gains (asset held one year or less) are taxed as ordinary income; long-term gains are taxed at preferential rates of 0%, 15%, or 20% depending on taxable income, with an additional 3.8% Net Investment Income Tax for high earners.
The short/long split is the single most important variable in tax-aware investing, often turning a 37% federal marginal rate into a 20% one. The threshold is exactly one year and one day from the acquisition date — the IRS uses 'more than one year' language. A trade settled on the 365-day mark is short-term; the 366-day mark is long-term. For inherited or gifted lots the holding period clock includes the original holder's tenure, which often produces immediate long-term status.
The 2026 long-term thresholds (single filer): 0% up to ~$47k taxable income, 15% from there to ~$518k, 20% above that. Married filing jointly approximately doubles each threshold. The 0% bracket is more than a curiosity — for retirees with low ordinary income and large taxable-account holdings, harvesting gains into the 0% bracket is one of the cleanest tax-arbitrage moves available.
The 3.8% NIIT layers on top for taxpayers with modified AGI above $200k single / $250k joint, applying to the lesser of (a) net investment income or (b) MAGI over the threshold. For ultra-high-net-worth filers in California, the all-in long-term rate climbs to 20% federal + 3.8% NIIT + 13.3% state = 37.1%.
| Short-term (≤1 yr) | Long-term (>1 yr) | |
|---|---|---|
| Federal rate | 10–37% (ordinary income) | 0% / 15% / 20% |
| NIIT (high earners) | +3.8% | +3.8% |
| Top all-in (CA) | ~54.1% | ~37.1% |
| Loss against ordinary | up to $3,000/yr | up to $3,000/yr |
Realistic synthetic capital-gain test data needs the full split of holding-period mixes — not every household holding everything for years. The lot ledger should produce both short-term and long-term outputs across realistic scenarios: rebalancing trades that mix short and long, harvesting moves that produce specific-lot relief, and inherited lots that arrive long-term regardless of recent activity.
Common pitfalls
- Counting holding period from settlement date rather than trade date — the IRS uses trade date for the long-term threshold.
- Failing to step gifted-lot holding period from the donor's acquisition date (the gift inherits both basis and clock).
- Treating mutual-fund distributions as separate from capital gains — fund distributions of long-term gain pass through and are taxed to the holder at LT rates regardless of how long the holder has owned the fund.
- Computing NIIT on gross investment income instead of net (deductions allocable to investment income reduce the NIIT base).
Examples
Lot acquired 2024-08-15 at $40, sold 2025-08-14 at $60. Holding period 364 days — short-term, $20/share gain taxed as ordinary income. Same trade settled one day later (2025-08-16) crosses the 'more than one year' threshold and becomes long-term.
Retired couple, MAGI $40k from Social Security and pension. They have $80k of unrealized long-term gains in a taxable brokerage. They can sell up to ~$57k of long-term gain (filling to the top of the 0% bracket) entirely tax-free at the federal level — the highest-leverage move in their drawdown plan.