You would add them to the purchase price, not deduct them from the sales price.
Almost
no closing costs incurred on a sale of a residence are deductible. An
exception is any mortgage interest or real estate taxes charged at closing to
bring them up to the closing date. All other closing costs (Title fees,
real estate commissions, documentary stamps, credit report costs, costs of an
abstract, transfer taxes, home inspection, flood certificate, attorney fees,
etc. ), instead of being deductible, reduce the sales price of the property.