https://turbotax.intuit.com/tax-tips/investments-and-taxes/capital-gains-and-losses/L7GF1ouP8
Can I deduct my capital losses?
Yes, but there are limits. Losses on your investments are first used to offset capital gains of the same type. So, short-term losses are first deducted against short-term gains, and long-term losses are deducted against long-term gains. Net losses of either type can then be deducted against the other kind of gain.
For example,
.... (這一段你自己念和理解)