In order to solve the problem that the metro stray current cannot be directly numerically measured by the existing methods, and the data acquisition distortion caused by the special operating environment of the metro system, a new onâline monitoring method for stray current was put forward in this paper. First, the stray current distribution function at different positions of metro trains was derived. Then, the equivalent circuit of stray current was built according to the field measured environment, and the numerical calculation formula of stray current was deduced. On the basis of the formula, the metro stray current could be calculated by the realâtime monitoring data, and the calculated data can be filtered and fitted with the stray current distribution function. In order to identify the distorted data, the potential energy function was introduced to judge the deviation degree of data point from the fitting function, so the erroneous data can be effectively eliminated. Thus, the accurate distribution value of stray current along the metro track was obtained. Taking a metro station in a certain city as the prototype, the CDEGS simulation model was built to verify the proposed method. The simulation results showed that even under the condition of sampling data distortion, the method could directly calculate the stray current value in real time, which had strong fault tolerance. © 2020 Institute of Electrical Engineers of Japan. Published by Wiley Periodicals LLC.