Calculate your adjusted cost basis
Your adjusted cost basis is your initial cost basis less the total amount of depreciation you’ve taken over the course of ownership. So let’s say your initial cost basis was $1,000,000 and you’ve held the property for 5 years. At $36,363.64 in depreciation per year that’s $181,818.18 in total depreciation taken over 5 years. Thus your adjusted cost basis would be $818,181.82.
Calculate your realized gain
Let’s say you sell the property in the aforementioned example for $1,200,000 after 5 years. Your gain from the sale will be calculated by the actual sale price minus your adjusted cost basis. So in this example, $1,200,000 – $818,181.82 = $381,818.18.
Subtract depreciation from total gains
The next step is to separate the total amount of depreciation taken from your total realized gain on the sale. This is important because the depreciation that is “recaptured” will be taxed at a different rate vs the remainder, which will be taxed as capital gains.
In our example, the total realized gain is $381,818.18. Of that amount, $181,818.18 was from depreciation (i.e. the realized gain was higher because your adjusted cost basis was lower due to depreciation). So $381,818.18 – $181,818.18 = $200,000.00 which means that depreciation counted for $181,818.18 of the total gains and $200,000.00 was the actual capital gain.
Calculate tax owed
The total amount of depreciation “recaptured” is filed as ordinary income, and taxed at a maximum rate of 25%. The remainder is taxed as a capital gain. Assuming a 20% capital gains tax rate in the above example, the total tax liability would be $181,818.18 x 25% = $45,454.55 in depreciation recapture tax, and $200,000.00 x 20% = $40,000.00 in capital gains tax. The total tax would be $85,454.55.
Pro Tip: There is no depreciation recapture if a property sells for a loss, although the taxpayer may qualify for an ordinary loss per IRC Section 1231. Keep in mind that if a property is held for one year or less, the gain from the sale would be taxed as ordinary income.