When you purchase a new rental or commercial property with investment intent, you must allocate a portion of the purchase price to improvements and the remaining amount to land. The reason for this practice is that you cannot depreciate land, only improvements. This makes sense because dirt lasts forever.

Depreciation is the reduction in value of a property over time due to the particular wear and tear on the asset. Residential properties are depreciated over 27.5 years, while commercial properties are depreciated over 39 years.

This reduction in value is a current expense, yet no money comes out of your pocket. Sounds like a pretty awesome deal, right? You get to reduce your reported income by your annual depreciation expense without actually paying for anything!

But what is depreciation really? Do you think the IRS, our favorite government agency, would let you have it that easy? I'll give you a hint: the answer starts with the letter "N" and ends with "O."

In actuality, depreciation is similar to an interest-free deferred loan with no time restrictions. You see, when you sell a property that you have been depreciating, you have to pay a thing called "depreciation recapture taxes" at a 25% rate. This 25% rate is multiplied by the total value of depreciation you have taken over the property's holding period. So the income you are "sheltering" each month really isn't being sheltered like you think it is, as you will eventually have to pay a portion of it back. Without prior knowledge (or having a good accountant), you could be in for quite the surprise!

I'm going to walk you through three scenarios of taxpayers in different marginal tax brackets: the 15% bracket, the 25% bracket, and the 28% bracket. I'll then provide you with three ways to avoid depreciation recapture taxes.

The taxpayer in the 15% bracket
Dave buys a single family rental for $100,000 and determines that his improvement ratio is 90%. Therefore, his improvements are valued at $90,000 (0.90 x $100,000) and will be his cost basis for depreciation. Dave's annual depreciation will be $3,723 ($90,000/27.5).

Assuming that his annual depreciation brings his net operating income to $0.00 each year, Dave saves $491 annually (0.15 x $3,723). If Dave holds the property for 10 years and then sells it, his 10 years' worth of depreciation will have saved him $4,910, a solid savings indeed.

But what Dave doesn't realize, likely because Dave didn't consult with a real estate savvy accountant, is that Dave has to repay the total depreciation taken at a 25% rate. The total amount of depreciation Dave took over ten years was $32,730, meaning his recapture taxes amount to $8,183. Annual depreciation actually costs Dave $3,273.

Depreciation Recap 1

The taxpayer in the 25% bracket
Dave buys a single family rental for $100,000 and determines that his improvement ratio is 90%. Therefore, his improvements are valued at $90,000 (0.90 x $100,000) and will be his cost basis for depreciation. Dave's annual depreciation will be $3,723 ($90,000/27.5).

Assuming that his annual depreciation brings his net operating income to $0.00 each year, Dave saves $818 annually (0.25 x $3,723). If Dave holds the property for 10 years and then sells it, his 10 years' worth of depreciation will have saved him $8,183.

The total amount of depreciation Dave took over ten years was $32,730, meaning at a 25% rate, his recapture taxes amount to $8,183, which is a net $0 savings. Because Dave consulted with a real estate savvy accountant, Dave knew he would owe nothing in depreciation recapture taxes and was essentially getting an interest-free loan on his money.

Depreciation Recap 2

The taxpayer in the 28% bracket
Dave buys a single family rental for $100,000 and determines that his improvement ratio is 90%. Therefore, his improvements are valued at $90,000 (0.90 x $100,000) and will be his cost basis for depreciation. Dave's annual depreciation will be $3,723 ($90,000/27.5).

Assuming that his annual depreciation brings his net operating income to $0.00 each year, Dave saves $916 annually (0.28 x $3,723). If Dave holds the property for 10 years and then sells it, his 10 years' worth of depreciation will have saved him $9,164.

The total amount of depreciation Dave took over ten years was $32,730, meaning at a 25% rate, his recapture taxes amount to $8,183, which amount to a savings of $982. Basically, the IRS loves Dave so much they decided to pay him a premium for the money they were lending him over the past ten years. And who said the IRS doesn't care about us?!

Depreciation Recap 3

We can make this more complicated
Due to inflation, the real value of your annual savings will diminish. So in order to increase the accuracy of our model, to "break even" in respect to inflation, you will need to account for the reinvestment of your savings from depreciation at somewhere around a 2.5% annual rate of return.

Additionally, we can break the model out on a monthly basis rather than an annual basis to gain a clearer picture of what is actually going on. We can model what would happen if we reinvest our annual savings into various investment vehicles over the hold period to develop a strategy that makes sense and best utilizes depreciation savings. But that's all beyond the scope of this article.

Moral of the depreciation story
Being in a low tax bracket actually hurts the taxpayer in respect to depreciation expense. Fifteen percent Dave should have tried to minimize his annual depreciation expense, which really boils down to how much of the purchase price he allocates to improvements vs. land. If Dave's research could have supported a higher land valuation, he would have been better off to go that route.

This can be a double-edged sword, though. If Dave's rentals push him into the 25% tax bracket, Dave will then want to take more depreciation, as seen in the next scenario.

On the other end of the spectrum, 28% Dave fares quite well in respect to depreciation and should try to utilize the highest improvement ratio he can support to shelter even more of his income per month. Since 28% Dave only pays the IRS back at a 25% rate, he will come out on top.

And of course 25% Dave is just excited to get an interest free loan. He thought lenders did away with that years ago.

Avoiding depreciation recapture taxes
There are three good methods of avoiding depreciation recapture taxes.

The first option is to utilize a 1031 exchange. Doing so will allow you to defer paying depreciation recapture taxes, as a 1031 exchange allows you to roll the depreciation into the next property. The downside here is that you are merely deferring your depreciation recapture tax liability and will have to pay the recapture taxes upon the sale of the exchanged property at some point in the future.

The second option is to never sell your properties and pass them onto your heirs apparent. When they inherit your investment property, they receive a "stepped-up basis" equal to market value at the date of death, or if they elect this option, the market value six months after the date of death. This means that your heirs apparent will not have to pay your depreciation recapture taxes or capital gains from your original purchase price.

To illustrate, let's assume you pass on a fully depreciated property to your heirs. Over the years, you benefited from $90k of depreciation, and if you would have sold, you would have owed $22,500 in depreciation recapture taxes. Due to the stepped-up basis your heirs receive, that depreciation is wiped clean, and their cost basis will be the fair market value at the date of death. Even better, if it's still a rental, they can begin depreciating it all over again.

The third option (which is not so popular) is to sell the property at a loss. Gains are calculated by subtracting the property's adjusted basis from the selling price. Adjusted basis generally means original purchase price plus improvements, less depreciation and amortization.

So if you bought a property for $100,000 and you have taken $5,000 worth of depreciation, your adjusted basis is $95,000. If you sell the property for $95,000, you will have a $0 gain and will not have to pay recapture taxes on that $5,000 of depreciation.

There are many other ways to utilize tax deferred strategies to avoid depreciation recapture taxes and capital gain taxes, but can be complicated to explain and so are beyond the scope of this article. The important thing to note is that something as small as depreciation can have lasting impacts on your bottom line and is critically important to plan for in your overall investment strategy.

This article originally appeared on Bigger Pockets and is Copyright 2014 BiggerPockets.

By Brandon Hall for BiggerPockets. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.