As with all investments, the sale price is compared to the purchase and improvement price (maintenance costs not allowed, but improvements are). If you "got" more in it than you sold it for, then you can claim a "capital LOSS".
You can offset up to $3000 of regular income with capital losses each year PLUS you can offset both long and short term capital GAINS (from profitable stock sales, etc) with the amount of the LOSS.
any capital Losses will roll over to the next year where you can continue to use them up to offset income or gains.
Be sure to let your tax man know about your loss and be able to document it.