Get your taxes done using TurboTax

It is just this simple : 

 

Purchase price + cost to buy + improvements + cost to sell =  cost basis

 

Sales price - cost basis =  Capital gain or loss 

 

To determine the taxes on your return when you have a Capital gain you need to use the Sch D  cap gain worksheet.  https://www.irs.gov/pub/irs-pdf/i1040sd.pdf