How to calculate the profitability of an investment property, taking mortgage leveraging into account?

If you buy a property with cash, its fairly easy to make a calculation by totaling your profits over the lifetime of your investment against investing the same amount into an index fund. But how does one make a similar calculation for a property purchased with a mortgage? Let's say I'm buying a house for 1 million and I'm putting down 100k as my initial payment, with 4% interest for the remaining years. What would be the total profitability of the investment presuming a \$4000 monthly rental payment and a yearly increase of 3% in property prices?

• You're ignoring taxes, repair (which can get really expensive), unoccupied time, and the time and expense to evict renters who stop paying and trash the place. Sep 29, 2019 at 16:21
• Anyway, "buying a house for 1 million and I'm putting down 100k as my initial payment, with 4% interest for the remaining years" means that there's an `N year` mortgage at 4%. Any mortgage calculator will tell you the total interest paid. Sep 29, 2019 at 16:22
• @RonJohn what if I'm living in the property instead? I'm mainly interested in how to factor in the fact that the bank loans me money. Ignore the issue with renters for the sake of this question :) Sep 29, 2019 at 16:29
• @RonJohn sure, but the bank loans me 900k initially, which is a 10x leverage. How do I take this into account when calculating my profitability? Sep 29, 2019 at 16:30
• Your question confuses me, since you don't have that \$900K in your pocket. It (along with your \$100K downpayment) went straight to the previous owner. Or am I grossly misunderstanding you? Sep 29, 2019 at 16:35