Your cost basis is what you paid to buy the home, for materials and contractors. You can’t take anything for the value of your own labor. You can add the cost of permanent improvements, but not repairs. An improvement is also known as a “betterment”, and it makes the property more valuable or it extends the useful life of the property or one of its sub-systems. Examples include new carpeting, new flooring, a new roof for a new furnace. Repairs keep the property in as-is or as-was condition without adding value or extending its useful life. Examples include replacing a section of worn carpeting, or painting or caulking. You can also include some, but not all of your closing costs, as described in IRS publication 523.
https://www.irs.gov/publications/p523