How do I calculate the rental yield for an investment property in Germany?

Rental yield is calculated as the annual cold rent divided by the purchase price, typically ranging from 4% to 5%. For example, a property with €12,000 annual rent and a €300,000 purchase price yields 4%.