The maximum amount of your loan is based on how much you qualify for based on your income, assets, etc, the appraised value of the home, and the number of units you will have at then end of the renovation. For example, you may qualify for x amount for a single family home but you'll qualify for more if it's going to be converted to two units because then the lender counts the rental income from the second unit. Under a 203k you can borrow up to 110% of the appraised ARV of the home (assuming your income is not the issue).
Once you have your max loan amount, then your max renovation budget will be your loan amount less the acquisition cost of the property. How much you actually choose to spend is up to you.
The part where this gets tricky is that you have to have a renovation budget to order the appraisal. So you'll have to do your research or work with your contractor and realtor on a scope that brings you within market comps without having the cost of the repairs push you way over what you expect the appraised value to be.
I hope this wasn't convoluted. Your lender and the 203k consultant that you're required to hire should also be able to answer any specific questions you have.