If your new carpet is an upgrade rather than a repair, you should treat the expense as a capital expenditure and amortise it over time. Start amortising the expense as soon as the carpet is installed and ready to use. Carpet has its own amortisation schedule. Capital improvements are a balancing act.
If you've owned your home for ten years and replaced the carpet 8 years ago, that's a capital improvement. But - if you removed that carpet and installed hardwood floors, only the hardwood floors count as a capital improvement. The improvement must be transferred at the time of the sale of the house. It is well established that replacing an entire carpet in a rental property is an improvement, not a repair.
In contrast, fixing a hole in a carpet is a currently deductible repair. For example, replacing the carpet in a rental home can be costly and generally exceeds the capitalisation threshold. Depending on tenant turnover, this maintenance may occur several times over a ten-year period. Under the new rules, carpet replacement would be expensed in the year it occurs for this taxpayer.
For example, if you replace a low-end carpet, you can only claim the cost of replacing it with another low-end carpet.