There are a few software programs that will import your trade data and figure it all out. Read the FAQ at one of the sites here. It's very informative.
https://bitcoin.tax/faq Also, the IRS tax guide here:
https://ww w.irs.gov/pub/irs-drop/n-14-21.pdf - broke the link on purpose. Knowing the amount I'll have to pay makes me sick. I know I'll be reported otherwise.