Investors & landlords

your broker does all this arithmetic for you on your 1099-B. There is nothing for you to do but copy the numbers.