Capital gain tax is a tax that is levied on the profit you make from the sale of a capital asset, such as stocks, real estate, or a business. If you sell a capital asset for more than you paid for it, the difference between the sale price and the purchase price is considered a capital gain, and you may be required to pay capital gains tax on the profit.

Capital loss harvesting is a strategy that involves offsetting capital gains with capital losses in order to reduce the overall amount of tax you owe on your investment income. In the United States, capital gains and losses are classified as either short-term or long-term, depending on how long you have owned the asset before selling it. Short-term capital gains and losses are those that arise from assets that you have held for one year or less, while long-term capital gains and losses are those that arise from assets that you have held for more than one year.

Here is a scenario in which a person has a $1 million dollar gain from exercising stock options in a private company, but does not sell the stock and is able to offset the gain with stock investment losses:

Even though John has not sold the stock, he still has a taxable event when he exercises the stock options and acquires the shares. The difference between the exercise price and the fair market value of the shares at the time of exercise is considered a "bargain element" and is subject to tax as a taxable compensation. In this case, John has a bargain element of $8,000 per share ($9,000 per share fair market value - $1,000 per share exercise price), for a total of $8 million in taxable compensation ($8,000 per share x 1,000 shares).

However, John also has some other investments in stocks that have not performed as well. For example:

Under normal circumstances, John would be required to pay capital gains tax on his $8 million gain from the exercise of the stock options. However, John can offset some or all of his capital gain by using his capital losses from the sale of the XYZ stock. Specifically:

Overall, capital loss harvesting can be a useful strategy for minimizing the tax liability on capital gains, especially when you have gains from the sale of one asset and losses from the sale of another. By offsetting your gains with losses, you can reduce the overall amount of tax you owe on your investment income. It's important to carefully track your capital gains and losses and to consult with a tax professional to ensure that you are taking advantage of all available tax strategies to minimize your tax liability.