Not everything... up to $50K filing jointly (25k separately)and you don't aviod taxes, you defer them until you sell the replacement stocks. Please read IRS Publication before proceeding. There are limitations. Link.. Page 63 "Rollover from publicly traded securities" http://www.irs.gov/pub/irs-pdf/p550.pdf