Deductions & credits

Thank you Mark.  This makes sense.  For the expenses of selling the house, is it acceptable to split them between the land and the structure only or do I need to allocate the expenses to land, structure and roof?  It seems that if I allocate the proceeds as you said, then allocate sales expenses in a similar manner, I get a net loss on the roof and my total tax bill goes down compared to netting the roof at $0 gain/loss and allocating expenses between the other two items.