Transit-time ultrasonic flow meters are widely used in industry to measure fluid flow. In practice ultrasonic flow meters either show a zero-flow error or suffer from a significant random error due to a limited signal-to-noise ratio, requiring a significant amount of averaging to achieve good precision. This work presents a method that minimizes the zero-flow error whilst keeping the random error low, independent of the hardware used. The proposed algorithm can adjust to changing zero-flow errors while a flow is present. The technique combines the benefits of two common methods of determining the transit-time difference between the upstream and downstream ultrasonic waves: cross-correlation and zero-crossing detection. The algorithm is veri...