Flow Rate Using a 4" Bottom Drain Pipe

In a gravity flow system, what is the max flow rate going thru a 4" bottom drain pipe? I've wondered about my own pond, which I feel is constrained by the flow rate limits of the 4" bottom drain. Flow rate is at 5000gph, but it can't handle twice the rate.

There seems to be a formula for this, but I forgot about it.

My filter is far away from my pond, and I believe the length of my bottom drain pipe causes friction losses which in turn limits the flow rate more.

Add: I also have 2 3" skimmers, which I forgot to mention.