Tax-loss harvesting is used to offset capital gains and lower the taxable income by automatically selling an ETF that has fallen below the price you paid for it and replacing it with another ETF in the same asset class to keep your asset allocation consistent.