How to calculate the time it takes before the water valve stops dispensing water in an Automatic Water level controller?
The concept you have is more complicated than you can imagine. But to answer your question (which is not so arduino-based), the mathematical formula you looking for is Torricelli's Law.

My suggestion for you is design a system which use a feedback concept instead