The maximum loss that can be applied is $3,000 and the balance is carried over to future years. However, the maximum loss is the net capital loss. In your case, that would be $8,000 - $4,000, or a $4,000 net loss. $3,000 would be deductible in 2016 and the balance next year.