We built a second home in 2001 and just sold it in 2020. What all can i include in the COST of the home to determine an accurate profit we gained off the home?

We built the home and made improvements over the years. What can be included? Had to make some major repairs when we sold it.