Your best bet for making the best use of your budget is to consider how much food costs. For the most part, even very expensive cities have some reasonable hostel or low-cost hotel options, but food costs can blow a hole through even the most thorough budget. As for time, consider how long it will take to commute to the points of interest you want to see. For Machu Picchu, for example, if you plan to hike there, you will spend most of your trip on that hiking excursion.