In this study, a particle swarm optimization (PSO) algorithm was implemented to quantitatively analyze the Lead (Pb) concentration in water. Thirty-five samples with different concentrations of Pb(NO3)2 were detected by laser-induced breakdown spectroscopy (LIBS). The strong spectral line of 405.78 nm was selected as the analytical line. The PSO algorithm was created, trained and tested by IPb. The results have shown that PSO algorithm has many advantages. The Mean Relative Error Percentage (MREP) and the Relative Standard Deviation (RSD) of the test results obtained by PSO algorithm are better than those obtained by Genetic Algorithms (GA) and Ant Colony Optimization algorithm (ACO).