Deductions & credits

the 7K paid at closing doesn't mean you had a loss on the sale of your home.  

extremely oversimplifies example. say you sold it for $250K and had a mortgage of $257K you would pay $7k at closing, the mortgage has nothing to do with determining gain or loss

 

gain or loss

gross sales price less selling and closing costs

less tax basis in the property is your gain or loss.

 

if it was your personal residence that was never rented any loss is not deductible. gain may qualify for exclusion if you own and occupied it for any 2 years in the last 5 years before the sale.

 

a more complicated situation arises if it was ever rental property.