Understand tax impacts when selling a residence, including eligibility for gain exclusions and factors that affect taxable profit.