There are various formulas ...
Published by David Hughes, Principal at Modernizing Distribution
There are various formulas available to calculate in two categories. If leak is relatively small and pressure is unchanged and known and size of opening in pipe is measured, a calculation can be made. Larger leaks require knowledge of pressures (like hydrant flow test). See https://www.lmnoeng.com/Flow/LeakRate.php and https://moruralwater.org/water-tools/