Deductions & credits

What you did with the proceeds or that you bought a new house doesn't matter anymore.  You need the cost basis of the house you sold to figure the gain of Loss.