Get your taxes done using TurboTax

look at the 8582 the 1231 gain should be on line 2a

the passive losses will be on line 2b unless they're from active participation in real estate. then the losses will be on line 1b

line 3 would show a 20K net loss

but any limitation is computed in part 2 of the form.