Get your taxes done using TurboTax

just to clarify - because there appears to be fixation on the $6000...

 

there will be capital gains on $4000 as the capital loss of $2000 will be netted against the capital gain of $6,000 to yield $4000.  

 

But there may not be any tax to pay in any event - depends on how much that IRA distribution is net of your standard deduction. 

 

It is possible that the capital gains rate is 0% in any event; hard to know with the limited details you provided.