Abstract: This study presents a method to calibrate pipe friction factor in oilfield water injection pipeline based on particle swarm algorithm. Particle swarm algorithm is simple and easy to implement without gradient information, especially its natural characteristics of real number encoding is suitable for processing the continuous optimization problem. Particle swarm algorithm possesses good capability to avoid the local extremum and obtain the global extremum. Grouping method is used is to reduce the number of optimization variables. Finally, a practical example verified the feasibility of the presented method.