Your brokerage statement should indicate which box you need to use for each type. Assuming your short and long term transactions are "covered", the short term is reported in Box A; the Long Term covered in Box D. The transactions where basis was not reported to the IRS are probably for shares you purchased before 2011, because brokers were not required to track basis until then. So you report them as Box E (Long Term non-covered), putting "Various" as the Date of acquisition. Your broker may have put the cost basis on your 1099B (look in the detail section if it's not on the front) even though they didn't have to; if there is no cost basis for those shares you should contact your broker for help in computing it. Then enter that basis number on Line 1e.