If a property loses money for the year the first place to deduct these losses would be from the profits of another rental property. If this is not possible, for example if a person only owns one rental property or all of their rentals lost money in the given tax year, then the property owner may be able to deduct these losses, with limits, from other taxable income, i.e. w-2 income.
The first hurdle to do this is that the property owner must "actively participate" in the management of the property. Active participation is much as it sounds but it is important to note that it is OK to have a property manager and still actively participate in a rental. In order to claim active participation an owner must do things like approve tenants, approve expenditures over minimum amounts, and so forth. Just as with any other business you can actively participate in a business and still have a hired manager so too can this apply to rental property.
The second hurdle is income related. Married rental property owners filing jointly and single owners filing single returns can deduct losses from their other income provided their Modified Adjusted Gross Income (MAGI) is $100,000 or less. The amount of losses from their rental activity that they can deduct is capped at $25,000 in losses per year. Additional losses are carried forward to the next tax year.
For married couples (filing jointly) or single persons making more than $100,000 the amount of losses that can be deducted goes down by 50 cents for each dollar over $100k they make.
For example, if Bob and Sue file a joint return as a married couple and their income (MAGI) is $120,000 then they can deduct up to $15,000 in rental losses ($20,000 amount earned over $100k times .5 equals $10,000. $25,000 limit minus $10,000 equals $15,000). Any further losses would have to roll forward to the next year.
Married couples who have lived together any part of the year but file separate returns cannot take the $25,000 deduction at all. If they lived separately the entire year they can each take $12,500 in losses as a deduction but their income is capped at $50,000 instead of $100,000 with the same 50 cent reduction for each dollar over the $50k income limit.
Lastly, it should be noted that there are additional caveats too detailed for this article. MAGI (used above) is best described as line 38 of IRS form 1040. There are exceptions to this though. For a more thorough review of MAGI (Modified Adjusted Gross Income) and also the $25,000 deduction described above see page 14 of IRS publication 527.