The need for new railway bridges is driven by the growing volume of transportation demands for both passenger and freight traffic on railway networks. In the design of these bridges, the fatigue limit state is a criterion that usually limits the allowable applied load level and thus also the utilization of the high strength of the steel material. Therefore, improving the fatigue performance of welded details by high‐frequency mechanical impact (HFMI) treatment leads to a more efficient design. However, the fatigue performance of HFMI‐treated welds is known to be affected by the mean stress and this needs to be considered in the design of treated welded details in steel bridges. This is rather straightforward if the bridge is subjected to cycles from one type of train but becomes cumbersome when several different sets of trains (e. g. axle loads, axle distances) cross the bridge. In this article, a factor to take the mean stress effect (including self‐weight and traffic load variations) into account is derived from traffic data measured in Sweden. Moreover, the mean stress effect is also predicted using the different fatigue load models in the Eurocode. These models either consist of one‐load patterns such as LM71, SW/0, and SW/2 or are composed of different trains with different combinations. It was found that the mean stress effect is underestimated by the first group of models. On the other hand, the mean stress predicted by the light traffic mix is found to be close to that calculated using real traffic data, while other mixes (standard and heavy) underestimate the mean stress effect. Therefore, a correction factor to account for the mean stress effects in real traffic is derived (called here λHFMI). This factor can be used to correct the design stress range for fatigue verification of HFMI‐treated welded details in railway bridges.