Short answer. Not as a deduction on your own home's yearly return. A new roof is a capital improvement: you add its cost to your home's basis, and it can lower the taxable gain when you sell, so the place it shows up is the return for the year of the sale, not the year you paid for it.
Where the roof shows up
When you sell, your gain is the amount realized minus your adjusted basis. Basis starts with the purchase price and certain closing costs and rises with improvements like a new roof, new gutters, or added insulation. If your gain is above the home sale exclusion, $250,000 for most single filers and $500,000 for most married couples filing jointly, those improvements reduce the tax.
A quick example
You bought for $250,000 years ago and sell for $640,000. Without improvements, the gain is $390,000. A $15,000 roof and $35,000 in other improvements raise the basis to $300,000 and cut the gain to $340,000. For a single filer using the $250,000 exclusion, the taxable portion drops from $140,000 to $90,000.
Records to keep
The signed contract and the final invoice showing the total.
Proof of payment.
If insurance paid part of it, the claim estimate and payment letters, because insurance reimbursements change the basis math.
The manufacturer and workmanship warranties, which buyers also ask to see.
Exceptions
On a rental, the roof is depreciated over 27.5 years. A qualifying home office may allow a business-use share. IRS Publications 523, 527, and 587 cover the details, or ask a tax professional. If a storm caused the replacement, read does homeowners insurance cover roof replacement before paying out of pocket, and see recoverable depreciation for how insurance pays it.