Deductions & credits

First the mortgage is immaterial to this situation and it not part of the profit/loss calculation.  And the ability to roll the profits into the next personal residence went away back in 1997.

 

Next, if this was the son's personal residence for 2 years out of the last 5 then HE needs to sell the home to get the personal residence exemption on the first $250K of profit.  

 

Purchase price + cost to purchase + cost to sell =  basis 

Selling price - basis =  cap gain or loss

 

Last ... dad was given the home so the basis to the father is the same as the son's basis  HOWEVER  he is not eligible for the exclusion since he did not own the home  for 2 years  and will pay cap gains tax on every $ of profit.