Deductions & credits

Note that if this was your main home, you may qualify for a partial capital gains exclusion if the reason you sold was due to an unforeseeable financial hardship.  See publication 523 starting on page 6.

https://www.irs.gov/pub/irs-pdf/p523.pdf