Use tax software, the sch D and form 8949 are filled automatically after you are done with the interview.