Deductions & credits

https://www.irs.gov/pub/irs-pdf/p523.pdf

When you sell a second home, you will owe capital gains tax on your gain, which is the difference between the selling price and your adjusted cost basis. Allowable adjustments to basis are listed in IRS publication 523.

 

Briefly, you can include the cost of permanent improvements but not repairs, along with some of your closing costs as described in publication 523. Repairs are not adjustments to basis because repairs are things that you are supposed to do as a property owner to keep the property in as is condition. Improvements are permanent changes that add value or extend the working life of the home or one of its systems.  (Improvements are also sometimes referred to as betterments, because they make the property better rather than maintaining it as it is.)  For example, painting the living room is a repair because it keeps the house in as-is condition and doesn’t materially increase its value, but replacing the carpet is an improvement, because it extends the useful life of the flooring system.  You can only count improvements that are still a permanent part of the property. For example, if you bought the home in 2000 and replaced the carpet in 2001 and again in 2015, you can only include the cost of the second replacement, because it is the only improvement that is still part of the property.