Get your taxes done using TurboTax

there is no limit. all the losses can be used to offset the gains. if the losses exceed gains by more than $3000 that's all that can be deducted against other income any excess is carried forward to offset gains in future years,

when a passive activity is disposed of the losses are no longer passive. upon complete disposition of the activity any suspended losses are allowed