The cheapest way to get a guided tour of machu pichu is to get several prices from different tour operators. I suggest you begin by inquiring at your hostel or hotel as most will try to push you on there tour which is usually more expensive. Please remember that you can stay in Aguas Calientes overnight but beware of the alien mosquitos and bring plenty of deet. Accomidation in Aguas Calientes is cheap to more expensive depending on what you find. Once again check around before you decide which one is right for you.
After getting an idea of the cost at your hostel or hotel I suggest walking around the plaza de armas and inquiring at a few of the tour operators around the square. I found the cheapest deal just past the McDonalds and it was a great deal. You just have to check a few different places and then at each one just tell them what you have already been offered it is that simple and most speack english so dont worry. Cusco is really laid back and dont be afraid to go after a bargain.