Deductions & credits

Basis =  purchase price + cost to buy + cost to sell + improvements