Deductions & credits

What matters is whether you made a profit. The expenses of capital improvements is added to your cost basis (what you paid for the house) which in turn decreases your taxable profit.