There is really no one rule, because it all depends on what you want in your sump, and what you want it to do.
If you just want it to be a place for your pump, heater(s) and some biological and mechanical media, and you have enough room to easily do maintenance, then a 40 gallon would do.
If you want part to be planted, or act as a refugium, beside holding all the gear, and media you want out of the main tank, you may want more space.
I have used barrels, tanks, even swimming pools as sumps.
I like to plant sumps when the fish in the main tank won't allow plants.
I string some containers together but have separate shut offs if I want to be able to take part of it out of service while doing maintenance, but keep the rest running.
If some fish are more carnivorous than others I might want to run a fractionator in or near the sump, or a fluidized bed.
The possibilities are almost endless.