The Korteweg-de Vries (KdV) equation is often adopted to simulate phase-resolved random waves on large scale in shallow water. It shows that the KdV equation is computationally efficient and can give sufficiently accurate results, but it is not always suitable and the error by using it cannot be predicted. This paper attempts to give the quantitative formulas for estimating the error of the statistics when simulating random waves in shallow water by using it. The formulas are obtained by fitting the errors of the KdV equation in comparison with the fully nonlinear model using the same initial condition based on the Wallops spectrum with a wide range of parameters. This paper also demonstrates how the formulas would be used, e.g., to estimate the error of the results by using the KdV model, or to justify its suitability for modelling random waves on large scale in shallow water.