Your understanding of the depreciation recapture process is almost correct, but there's a minor error in your calculation.
When you buy a house for $300,000, with $100,000 attributed to the land value, you have $200,000 allocated to the building or improvement value. As you mentioned, you can depreciate the improvement value over 27.5 years for residential property.
So, to calculate the depreciation recapture after 5 years, you can use the following formula:
Depreciation Recapture = (Original Improvement Value / Useful Life) x Accumulated Depreciation x Time Held
In your example, it would be:
Depreciation Recapture = ($200,000 / 27.5) x (5 years) = $36,364.36
So, after 5 years, your accumulated depreciation is approximately $36,364.36.
Now, when you sell the house for $400,000, the profit you'll have to consider for tax purposes would be:
Profit = Selling Price - Adjusted Basis
The adjusted basis is the original purchase price minus the accumulated depreciation. In your case:
Adjusted Basis = $300,000 - $36,364.36 = $263,635.64
So, your profit for tax purposes would be:
Profit = $400,000 - $263,635.64 = $136,364.36
This is the profit you'd pay capital gains tax on when you sell the property.
Regarding whether you're "adding to the profit" side of the equation or "deducting from the basis" side, it might seem like two sides of the same coin, but the way you account for depreciation and basis affects how you report it to the IRS. By reducing your basis through accumulated depreciation, you effectively increase the taxable gain when you sell the property.
It's essential to keep accurate records of depreciation, as it can have a significant impact on your tax liability when you sell the property. Consult with a tax professional or accountant for precise guidance on your specific situation, as tax rules can be complex and may vary depending on your individual circumstances.