The invention discloses a reactive power grid capacity configuration method for a random inertia factor particle swarm optimization algorithm. The reactive power grid capacity configuration method includes steps that I, acquiring system parameters of a WAMS system in real time and setting particle boundary conditions; II, initializing a swarm and determining an adaptive value of the particle; III, dividing iterative stages; IV, updating the speed and position of the particle; V, judging whether the iteration times arrives at the maximum iteration times of a global search stage; VI, judging whether the iteration times arrives at the maximum iteration times of a primary solution stabilization stage; VII, judging whether the iteration times arrives at the upper iteration limit; VIII, iterating till arriving at the maximum times, and outputting an online reactive capacity configuration method. Compared with a standard algorithm and an adaptive mutation algorithm, the reactive power grid capacity configuration method for the random inertia factor particle swarm optimization algorithm enables the optimization precision to be improved and realizes to improve the early global search capability and the late local search precision based on guaranteeing a convergence rate through combining with actual situations of reactive optimization, and the global optimal solution is ultimately obtained.