Figuring cost basis of rental property

I've been using TT for years for my taxes, including reporting income/expenses on several rental properties. I sold a rental property this year, Jan 10, 2020. Next year when I do 2021 taxes how do I figure the cost basis of the rental property I sold? Does TT do this automatically from the depreciation schedule?

 

As an example, if the purchase price was 100k and during the ownership I made improvements worth 40k is my cost basis $140k? If I have depreciated 30k of the 40k is the cost basis still $140k but 30k of depreciation gets recaptured automatically in the software?

--- thanks