As a general rule...
As a general rule ("general" is th ekey word), more flaps means shorter takeoff roll, but decreased climb gradient. Conversely, less flaps means longer takeoff roll, but better climb gtadient.
Boeing even has "Improved Climb" which is generally used if runway length and first segment climb issues are not the problem, but climb gradient is. Improved climb is generally used with FLAPS 1.
Again, "general" is the key word.
On the newer planes, the ones with sretched fuselage (e.g. 737-400), FLAPS 1 is not allowed, due to tail strike possibilities.
Various flap settings are certified....your individual airline may or may not publish data for takeoffs with all the flap settings that the aircraft was certified to do.
For example, my airline (I'm retired, now.) used to publish data for FLAPS 2 for the 737-200. Not surprisingly, usually (instead of 'generally') your performance would be a mix between FLAPS 1 and FLAPS 5 when using FLAPS 2.
Same goes for the mini-Bus. Generally, more flaps means shorter takeoff roll, but poorer OEI climb gradient. Less flaps means the opposite. Again...."generally". I've seen, however, due to obstacles on the first segement, a lower flap setting giving better performance for takeoff roll.
So, again, "generally".....
I've also flown the 727. Basically the same goes with that, as well. A takeoff out of Denver on a July or AUgust afternoon....well, FLAPS 5 may be the only way to get out of there without offloading weight. Your takeoff roll is in miles, not feet, but an engine loss at or after V1 is better handled.... Density Altitude is really high....your climb performance with OEI is poor with a FLAPS 15 takeoff.....
So, if you have a lot of runway, it's hot and high elevation, and you're heavy, less flaps may be better....
Fly safe,
PantLoad