Get your taxes done using TurboTax

The Net gain or loss on the sales will be on 1040 line 7.  You pay tax on a net gain.  A loss will be subtracted from your other income (up to 3,000, the rest you carryover to the next year).