Trial and error, mostly. You figure out over time how much you need to spend on necessities, and go from there. If you want an extra boost, get a Pokémon with Pickup. They find things like balls and potions all the time, so obtaining traveling supplies will be less of a strain on you.
[video]