Investors & landlords

Does the mortgage go into calculating one's basis?