In this paper, a proposed modified stochastic fractal search algorithm (MSFS) is applied to find the most appropriate site and size of capacitor banks for distribution systems with 33, 69, and 85 buses. Two single-objective functions are considered to be reduction of power loss and reduction of total cost of energy loss and capacitor investment while satisfying limit of capacitors, limit of conductor, and power balance of the systems. MSFS was developed by performing three new mechanisms including new diffusion mechanism and two new update mechanisms on the conventional stochastic fractal search algorithm (SFS). As a result, MSFS can reduce 0.002%, 0.003%, and 0.18% of the total power loss from SFS for the three study systems. As compared to other methods, MSFS can reduce power loss from 0.07% to 3.98% for the first system, from 3.7% to 7.3% for the second system, and from 0.92% to 6.98% for the third system. For the reduction of total cost, the improvement level of the proposed method over SFS and two other methods is more significant. It is 0.03%, 1.22%, and 5.76% for the second system and 2.31%, 0.87%, and 3.77% for the third system. It is emphasized that the proposed method can find the global optimal solutions for all study cases while SFS was still implementing search process nearby or far away from the solutions. Furthermore, MSFS can converge to the best solutions much faster than these compared methods. Consequently, it can be concluded that the proposed method is very effective for finding the best location and size of added capacitors in distribution power systems.