Calculating capital gains on rental property sale

When entering my original purchase price, the instructions say to include the cost of any loans. When I enter the sales price, do I deduct the payoff amount of the loan from the sales price? Do I deduct improvements there as well (plantation shutters, irrigation system, appliances, etc.)?