Investors & landlords

For best results, do rely on your 1099-B since the broker is required to track your basis and that's what goes to the IRS.