The below spreadsheet can be used to check key metrics before purchasing a property.

All cells in orange are to be filled in with your own values. Everything else is calculated.