Still I must ask, as I'm convinced that unlike with respect to bills, more is better. Why no suggestions that an overflow box 4 feet long out of a possible 12 feet is not too small? In fact given that the tank is 400 gallons and assuming that the minimum water being cycled is 2000 gallons per hour minimum (5 times tanks size), the height of the overflowing water above the tank edge of a 4 foot box would be large to accommodate such a rate.
I'm sure U6 has the calculation for how high the water would need to be with a 4 foot width to obtain a 2000 gallon per hour rate and that it is probably quite high. So again, I wonder about the 4 foot overflow out of a possible 12.
It really is not necessary to get into the math for this, rather that the principles involved be understood. As far as the mathematics go, Bernoulli's Equation and the Francis Formula come to mind. (one is metric, the other is imperial.)
Both equations are for determining the flow rate over a rectangular weir, based on the measured head height behind the weir, velocity, (width of the channel, width of the weir, gravity, etc.—Width of the channel would be the end to end length of the tank, and width of the weir would be the EFFECTIVE length of the overflow (weir.) It is not a linear relationship, rather a curve. With a little skill in algebra, the equations can be manipulated to give the head height behind the weir, for a given flow rate etc. I really don't see a need to do that with an aquarium, unless you like to push things too close to the top of the tank.
The idea is that we want the thinnest layer of water possible going over the weir, at any particular flow rate. The thinner the layer of water, the greater the percentage of surface water is going over the weir, opposed to subsurface water. Since the object is surface skimming/surface renewal, and the longer the weir, the thinner the layer of water, it is common sense that the longer the weir the better. The longer the weir the more rapidly the surface layer will be removed, and renewed. Don't need the math to arrive at that conclusion. (Just acknowledge the physics are the physics)
Armed with that little tid bit, 2000gph, 30" minimum is a starting point. (calculator on home page.) Remember that is without teeth. Is it adequate? Well that depends. Is that the best that you can do, is it ideal? Well, in a 30" tank it is the best that you can do, it is adequate, and ideal. But 2000gph in a 30" long tank is pretty unreasonable. (we are accomplishing different things in a DT than we are in a sump...) In a 48" tank, you can do much better, in a 12'/400gallon tank it is pathetic, and so is 2000gph. In a 12'/400gallon tank you can do way better than 48" and really need to. The minimum is around 60". I think we get too caught up in what is the minimum we can get away with, given parameters x, y, z. The emphasis should be placed on what is best for the system with parameters x, y, z. That is never going to be the minimums. The hobby is about the critters, not anything else (actually) and the end results will calm the raging lion over the amount of money you spent that you did not want to, or that long shallow overflow that will blend into the background and disappear in a relatively short period of time.