The way to drive software projects within the needle's eye we call the budget is to work out to have as much predictability as possible. Rule out and isolate what is unknown. Divide the project into what's predictable and what's uncertain. Remove unknowns by offering spikes, a time box where you try out new technology, and prestudies outside the project scope.
There are many tools a project manager could use. The following is what we developers can do to create predictability.
This is how you build a bookcase: