To guarantee the accuracy of ultrasonic flowmeter, an in-use measurement system for ultrasonic flowmeter incorporating digital signal processors and machine learning approaches was proposed. Based on random forest (RF) algorithm, we established a model including variables extraction and flow measurement error prediction for in-use measurement of ultrasonic flowmeter. To provide a better estimate, artificial neural network (ANN) is assessed for the prediction of flow measurement error. By obtaining working data of the flowmeter, the flow measurement error of ultrasonic flow meter is predicted using machine learning algorithms. For RF and ANN predicted model, the absolute value of deviations between predicted values and reference values are smaller than 0.21% and 0.26% separately. Furthermore, the degree of influence of different variables on the accuracy of ultrasonic flowmeter was analysed using RF algorithm. The uncertainty of the in-use measurement method using RF algorithm was evaluated, with an extended uncertainty within 0.26% (k = 2).