The exclusion applies to your primary residence and to a cash sale exactly as it does to a listed sale; the buyer's payment method changes nothing. Inherited houses receive a stepped-up basis to the value at the date of death, so a sale soon after usually produces little or no taxable gain. Investment properties are different: gain is taxable and depreciation is recaptured, which is why some landlords use a 1031 exchange. We are not tax advisors, so treat this as a starting point for a conversation with yours.