Deductions & credits

Also be aware of this:

Questions and Answers on the Net Investment Income Tax | Internal Revenue Service (irs.gov)

and consider State taxes.  Some states do not have a special capital gains tax rate.