Tax-loss harvesting lets investors turn market downturns into a potential tax benefit by selling losing investments and using those losses to offset taxable gains. Done carefully, it can lower your tax bill while keeping your long-term investment plan on track.