In Germany, the interest paid on your mortgage for own-use properties isn’t tax-deductible.
However, if you buy an investment property and rent it out as a so-called landlord, then you can offset your expenses resulting from generating rental income against your rent. This includes interest expenses as well as costs for maintenance and repairs. You can also deduct in this case a depreciation allowance of 2% (and in some cases higher) as cost from your income. The depreciation is calculated as a percentage of the building cost of the property (in other words, the purchase price minus the value of the land).
The following tax rates apply:
Here is an in-depth article on taxes for residential buyers.