Capital gains, tax-loss harvesting, step-up in basis, inherited IRAs under the SECURE Act, and the estate-planning mechanics every investor eventually needs.
Most investors spend hundreds of hours picking funds and zero hours learning the tax code that determines how much of the return they actually keep. Capital gains rates, the wash-sale rule, the Net Investment Income surtax, step-up in basis, inherited IRA distribution rules, and beneficiary designations can swing your lifetime after-tax return by 20-30%. This guide covers the mechanics in plain English with dollar-for-dollar worked examples.
Capital Gains: The Core Mechanics
When you sell an investment for more than you paid, the profit is a capital gain. The tax rate depends on one thing: how long you held it.
Short-term (held 1 year or less) — taxed as ordinary income. Rate: 10%, 12%, 22%, 24%, 32%, 35%, or 37% based on your bracket.
Long-term (held more than 1 year) — taxed at preferential rates. Rate: 0%, 15%, or 20%.
2026 long-term thresholds (single): 0% up to $48,350, 15% up to $533,400, 20% above.
2026 long-term thresholds (married filing jointly): 0% up to $96,700, 15% up to $600,050, 20% above.
Holding period counts the day after purchase through the day of sale — one day short of a year means short-term rates.
The Net Investment Income Tax (NIIT) Surtax
High earners face an additional 3.8% surtax on investment income (dividends, interest, capital gains, rental income). The thresholds have not been indexed for inflation since 2013, so more investors hit them each year.
Single filers: NIIT applies above $200,000 modified AGI.
Married filing jointly: NIIT applies above $250,000 modified AGI.
The 3.8% is on the LESSER of investment income or the amount above the threshold.
Effective top rate on long-term gains becomes 23.8% (20% + 3.8%); short-term becomes 40.8% (37% + 3.8%).
State taxes stack on top — California high earners pay ~37.1% on long-term gains after combining federal + NIIT + state.
Tax-Loss Harvesting: Turning Losses Into Savings
Tax-loss harvesting means selling a losing position to realize the loss, then using it to offset gains or up to $3,000 of ordinary income. Done right, it adds an estimated 0.3-1.0% per year to after-tax returns in taxable accounts.
Capital losses first offset capital gains of the same type (short vs long). Net losses then offset the opposite type.
Up to $3,000 of remaining loss offsets ordinary income per year ($1,500 if married filing separately).
Excess losses carry forward indefinitely — there is no expiration.
Only available in taxable accounts; losses in IRAs and 401(k)s are not deductible.
The Wash-Sale Rule — Don't Waste the Harvest
If you sell at a loss and buy a 'substantially identical' security within 30 days before OR after the sale, the loss is disallowed and added to the basis of the replacement. The rule exists to prevent fake losses while maintaining the same exposure.
Window: 30 days before + day of + 30 days after = 61-day danger zone.
'Substantially identical' is undefined but clearly covers the same ticker and near-identical index funds. VOO → IVV (both track the S&P 500) is debated; most tax pros avoid it.
Wash sales across accounts count — including your IRA, your spouse's accounts, and joint accounts. An IRA-triggered wash permanently loses the deduction (basis can't be added to an IRA).
Safe swaps: VTI (total market) → SCHB (slightly different index, different sponsor) or VOO (S&P 500) → VONE (Russell 1000).
401(k) dividend reinvestments can inadvertently trigger wash sales if you hold the same fund in both accounts — audit annually.
Step-Up in Basis — The Biggest Gift in the Tax Code
When an investor dies, assets in taxable accounts get a 'step-up' in cost basis to the fair market value on the date of death. The heir inherits at the new basis, so all pre-death gains escape capital gains tax forever.
Applies to taxable brokerage accounts and real estate. Does NOT apply to Traditional IRAs, 401(k)s, or annuities (those are taxed as ordinary income to the heir).
Does apply to Roth IRAs — but those were already tax-free, so basis doesn't matter for income tax.
Community-property states (CA, TX, AZ, WA, etc.) give surviving spouses a 100% step-up on all community assets; common-law states only step up the deceased spouse's half.
Changes the investing math for anyone 65+: harvesting gains before death wastes the step-up, while gifting appreciated assets transfers the low basis (heir pays gains, beats recipient later).
The Inherited IRA 10-Year Rule (SECURE Act)
The SECURE Act of 2019 dramatically changed how non-spouse heirs must handle inherited retirement accounts. The old 'stretch IRA' that let heirs spread distributions over their lifetime is dead for most beneficiaries.
Non-spouse beneficiaries must empty the inherited IRA by December 31 of the 10th year after the original owner's death.
Traditional inherited IRA withdrawals are taxed as ordinary income. Roth inherited IRA withdrawals are tax-free (but still subject to the 10-year rule).
IRS guidance in 2024 confirmed that if the original owner was already taking RMDs, annual RMDs ARE required during years 1-9 AND the account must be empty by year 10.
Exempt beneficiaries (Eligible Designated Beneficiaries) still get lifetime stretch: surviving spouses, minor children (until majority), disabled or chronically ill individuals, anyone within 10 years of the decedent's age.
Strategy: heirs in low-income years should accelerate distributions to stay under higher brackets; heirs at peak earning years should delay until retirement if possible.
Key Takeaways
Hold investments 1+ year for long-term capital gains rates (0/15/20% vs 10-37%).
Tax-loss harvest annually — the wash-sale rule's 61-day window is the only real constraint.
Step-up in basis at death eliminates all pre-death gains in taxable accounts.
Inherited IRAs must be emptied within 10 years (SECURE Act, non-spouse beneficiaries).
Beneficiary designations override your will — audit every account annually.