You won't owe any taxes on your $50,000 in gains because of your equally sized losses. If your losses exceed your gains, you can write off up to $3,000 of the excess losses each year against your income. Thus, suppose you lose $53,000 on one stock and gain $50,000 on another. (For more, see: Tax-Loss Harvesting: Reduce Investment Losses. Example Capital loss of $20,000 in 2012 – no gains against which to net it in year realized-must deduct against ordinary income. You can, however, claim up to $3,000 in capital losses as a tax deduction as of 2019, subject to a host of rules. You can carry any unused balance over to subsequent tax years if your losses exceed this amount. For example, if you have a $9,000 loss overall, you can claim $3,000 a year for three years in many cases.