The general rule of thumb with regards to ma'aser kesafim is that all expenses that are directly accrued to enable one's generation of income can be deducted from the reckoning of one's income with regard to ma'aser.
So for example, if one rents an office for one's work, the cost of upkeep of the office, including rent, insurance and so on are all income-associated costs that may be offset against one's income when calculating one's overall income. If one commutes to work, or if one's car is used for work, one can deduct those costs as well. However, if one uses a car for private use not associated with work, one cannot reckon the running costs as a business expense.
In your example, if one earns $100,000 and one has expenses on an investment property of $20,000 the tax office will only assess $80,000 of income. So too with calculations for tzedaka, you need only give 10% of $80,000.
Incidentally, as a general rule with regard to ma'aser kesafim, in order to avoid problems of nedarim, one should declare at the outset that by giving ma'aser one intends not to oblige oneself with any nedarim.