As an investor in a few rental properties, I always hated depreciation. As a landlord, I also learned — the hard way — to despise deferred maintenance.

My animosity toward these two line items on every investor-landlord’s tax return welled up again at tax time last spring. I’d sold a rental property the year before, and now the depreciation I had claimed over the years came back to bite me.

As an investor, you have no choice but to claim depreciation every year you own an income-producing property. If you don’t, the IRS will impute it for you. So every year, I dutifully claimed the benefit, which helped cut my taxes.

Now that the house had been sold, Uncle Sam wanted back some of the depreciation I had written off. Legally, it’s called “recapture,” but many landlords disparagingly call it the “Gotcha Tax.”

I’ll tell you how it works, but first, this important warning: Please don’t take this as professional tax advice; it isn’t. For a better and more detailed explanation, consult a tax accountant. But here is my layman’s understanding of depreciation:

Depreciation is a tax write-off that allows landlords to recover the cost of their properties as well as the improvements made to them. It’s basically an allocation of the cost of the property to future periods.

Because your property has a useful life beyond one year, you can’t deduct the cost of buying and improving the house on a single tax return like you can the cost of maintenance, repairs, homeowner’s association fees and other expenses. Rather, you must “capitalize” and depreciate those costs over their useful life, which the IRS says is 27.5 years for a house or condo.

Consider a rental house that you buy for $200,000. Since you can’t depreciate land, you must separate the cost of the land from the purchase price. So if the lot in this example is worth, say, $50,000, you can depreciate only $150,000. But even at the lower figure, your annual deduction can be substantial.

In this example, you would divide $150,000 by 27.5 and come up with an annual deduction of $5,455. To calculate your actual tax savings, multiply your annual write-off by your marginal tax rate. So, if you are in the 25 percent bracket, you will realize a tax savings of $1,364 each year you own and operate the place as a rental.

There’s no doubt depreciation is a great tax benefit. But it sucks when you sell the place because, as most rookie investors don’t realize, you have to pay a good chunk of change back to the feds. The IRS charges a maximum of 25 percent recapture tax on all the depreciation you have written off to a maximum of your original cost. And the charge can be a painfully bitter pill to swallow.

In the above example, in the year you sell, you may owe as much as 25 percent of the $150,000 you paid for the house sans land. It could be less because you are selling in a tax bracket lower than 25 percent, or you might not have fully depreciated the property. Still, in this example of a fully depreciated rental unit, the tax bite works out to $37,500.

Ouch! And double ouch for deferred maintenance, which can destroy your finances without any help from the government.

To avoid this silent slayer of profit margins, you must make regular inspections of your rental property — with notice, of course, to your tenants.

Don’t rely on tenants to notify you when a stove burner stops working, the toilet runs constantly or the kitchen faucet drips. Many tenants have no stake in their rentals, and others may be afraid you’ll blame them for the problem, so they tend to avoid reporting small issues. They’d rather just live with them, even if they’ll be held responsible for damages when they move out.

But small problems eventually turn into big ones; a landlord’s head-in-the-sand philosophy can become very expensive, very quickly. The failure to perform needed repairs could lead to property deterioration, higher costs, asset failure and even health and safety issues.

So it’s on you to stay on top of things by inspecting the structure, and all units, regularly. Here’s a rudimentary starter checklist.

Begin outside. Walk around the house in slowly tightening concentric circles, starting about 60 feet away. As you move closer, look for foundation problems, leaking shutoff valves, missing paint, holes, large cracks, damaged downspouts and areas where water is accumulating near the structure. As you get closer, check the soffits, doors, windows, screens and vents.

Inside, start in the basement or crawl space. Make sure there is no excessive moisture, and no critters squatting in the corner without paying rent. Check the pipes for leaks and be certain insulation is still in place. And test the stairs, decks and porches to be certain they are still safe.

Always check the HVAC system, and consider an annual service contract with your favorite local specialist. Always change the filters, even if they appear to be clean.

Finally, go into each room, looking for damage such as broken windows, screens or switch plates, torn carpeting or damaged flooring.

(Lew Sichelman has been covering real estate for more than 50 years. He is a regular contributor to numerous shelter magazines and housing and housing-finance industry publications. Readers can contact him at lsichelman@aol.com.)