You can spend as much as a bank gives you. But you should only spend the amount of money you are comfortable risking? I help dozens of properties owners who purchase homes for $60K-$80K, in terms of investments you have to put down 20-30% of the purchase price of the home, so in my customers cases they are putting down $15K-$20K, and they have mortgages on $50K -$67K, with a monthly cost of $500-700 depending on taxes and what the end of the scale the mortgage is on. They are renting the homes for $800-$900 so in most cases they are making $200 profit every month. BUT the months the property is vacant they are spending $500 a month, or the month the tenant stiffs them they are spending $500 month. The $500 a month they are spending is no a stress to them. They have it in the bank.
I think your question also might be what is the formula for a lender to approve a loan for you. Well your lender will not consider your rental income you "will" receive on the property because that is all theory, until it is rented. Then they wont even consider it as income until you have it rented for 24 months or more, at which point they take 75% of the rent an consider it income. The formula the lender will use is can you carry both mortgages without it being rented out? If not, you are not likely to get a second home. Best of luck to you in your real estate endeavors.
Here is a Blog on Return on Investments formulas needed to analyze real estate.
Follow the Blog for further help on investments.
Ps. If you have found this advice insightful and helpful please mark it as best answer. Thank you