Per IRS Publication 17 Your Federal Income Tax (For Individuals), page 66:
Generally, an expense for repairing or maintaining your rental property may be deducted if you aren’t required to capitalize the expense.
Improvements. You must capitalize any expense you pay to improve your rental property. An expense is for an improvement if it results in a betterment to your property, restores your property, or adapts your property to a new or different use.
Betterments. Expenses that may result in a betterment to your property include expenses for fixing a pre-existing defect or condition, enlarging or expanding your property, or increasing the capacity, strength, or quality of your property.
Restoration. Expenses that may be for restoration include expenses for replacing a substantial structural part of your property, repairing damage to your property after you properly adjusted the basis of your property as a result of a casualty loss, or rebuilding your property to a like-new condition.
Adaptation. Expenses that may be for adaptation include expenses for altering your property to a use that isn’t consistent with the intended ordinary use of your property when you began renting the property.
Safe harbor for routine maintenance. If you determine that your cost was for an improvement to a building or equipment, you still may be able to deduct your cost under the routine maintenance safe harbor. See Pub. 535 for more information.
RECORDS: Separate the costs of repairs and improvements, and keep accurate records. You will need to know the cost of improvements when you sell or depreciate your property. The expenses you capitalize for improving your property generally can be depreciated as if the improvement were separate property.