Tax-loss harvesting means realising a loss to offset realised gains, and sometimes a limited amount of ordinary income.

The mechanics

Losses offset gains of the same type first, then the other type, then a capped amount of ordinary income. Unused losses carry forward.

The wash-sale rule

Buying a substantially identical security shortly before or after the sale disallows the loss. Waiting out the window, or buying a genuinely different fund, avoids it.

Where it does nothing

Inside tax-advantaged retirement accounts there is nothing to harvest — gains and losses are not taxed as they occur.