No.
Profit is proceeds - cost basis.
mortgages don't count.
@vzombek
@vzombek the capital gains is based on the ASSET (the home); a mortgage is a liability and is not part of the equation,