Calculating the cost basis of a new rental property

I am trying to determine the correct way to calculate the basis of a new rental property; specifically, the amount to depreciate. Although there are many (and sometimes varying) descriptions of how to do this online, words can be vague and I would love to have a simple formula. It’s no help here that I am a programmer and that's how my mind works. TurboTax of course does the calculation, but it does not seem intuitive to me.

 

Here is a very simple scenario. A property costs $100K, that total being 40% land and 60% building. Closing costs are $1k. Prior to being placed in service, $10K improvements are made to the building. Assume these values are assigned correctly.

 

TT calculates the basis as (property + closing + improvements) x building percent of total = (100K + 1k + 10K) x 60% = $66.6K.

 

To me the more logical answer would be building + closing + improvements = 100K*60% + 1K + 10K = $71K. This is because the improvements are only to the building, not the land, so it does not make sense the value of the land should affect them.

 

I’m no accountant and I completely realize that the tax code may not be logical and that I am wrong. Can somebody please confirm that TT is doing it correctly? Can anyone supply a reliable reference with a formula, ideally from an IRS publication, or at least an IRS publication with a detailed description?

 

Thank you in advance for your time and attention.