When you sell a principal residence that has appreciated in value, you generally can exclude $250,000 ($500,000 for married couples) of the gain from tax. But many homes sell at a much higher profit, which is why you should keep track of your "basis." This is the cost of buying and improving your home, and it can reduce the amount of tax you owe.
Keep good records and receipts related to:
Note that general repairs that don't add value to the property (such as fixing leaks) usually don't contribute to your home's basis.