No, the mortgage is separate from the gain/loss calculation. The gain is calculated as "net amount realized" minus "adjusted basis". Net amount realized is gross sales price minus commissions and other selling costs. Adjusted basis is original cost plus cost of any improvements minus accumulated depreciation.
joN@jonacpa.com
Helping individuals and businesses nationwide reduce taxes and increase profits through sound planning and quality service