You can deduct capital losses up to the amount of your capital gains plus $3,000 ($1,500 if married filing a separate return) of net capital loss each tax year. You may be able to carry forward excess capital losses that you couldn’t deduct in the current year to future years to offset capital gains.
For example, if you had capital gains of $50,000 in 2017 and you also have a capital loss carryover of $100,000 from prior years, you can use the $100,000 carryover to offset the $50,000 gain and deduct a $3,000 capital loss on your tax return. You’ll still have a $47,000 capital loss carryover that you may be able to use in future years. Currently, there is no limit on how many years you can use your capital loss carryover.