The "standard" lenses would be 105mm for 6x7, and 150mm for 4x5". Then it all depends on your enlarger; what is the maximum enlargement possible with those lenses?
The extreme case here is the 11x linear to enlarge 6x7 to 20x24", which is just barely within the capabilities of a Durst 138S - without turning it horizontal. The same elevation gives 6.5x with a 150mm lens, which could give a 26x31" print.
Once things are turned on the side, the size is only limited by the length of your darkroom.
A shorter lens (with wide coverage) could be substituted for either, but unless your enlarger is short it is rarely necessary.