Deductions & credits

The cost of improvements adds to the cost basis and reduces your taxable capital gains.  See publication 523.

https://www.irs.gov/forms-pubs/about-publication-523