Nowadays, the non-optimal placement of the shunt capacitors in distributed electricity systems may increase the total active power loss and lead to the voltage instability. Therefore, many researchers have recently focused on optimization of capacitor placement problem in radial and meshed distribution grids aiming to minimize transmission losses and improve the overall efficiency of the power delivery process. This chapter aims to present a backward-forward sweep (BFS) based algorithm for optimal allocation of shunt capacitors in distribution networks. The total real power loss of the whole system is minimized as the objective function. Moreover, the feeder current capacity and the bus voltage magnitude limits are considered as the optimization constraints. In addition, it is assumed that the sizes of capacitors are the known scalars. The 1st capacitor is considered to be located at the 1st bus of the test system. Then, the BFS load flow is run and the objective function is saved as 1st row and 1st column component of a loss matrix. Secondly, the 1st capacitor is assumed to be installed at bus 2 and the BFS load flow is run to obtain objective function as 2nd row and 1st column component of loss matrix. When all buses are assessed for installation of capacitor 1 and losses are calculated in each scenario, similar analyses are carried out for the 2nd capacitor bank and the values of the active power loss are saved as the 2nd column of the loss matrix. The same strategy is applied to other capacitors. Finally, a loss matrix is formed with number of rows and columns equal to the number of buses and shunt capacitors, respectively. The best places for installation of capacitors are determined based on the components of the loss matrix. Simulation of BFS based capacitor placement problem is conducted on the 33-bus distribution network to demonstrate its robustness and effectiveness in comparison with other procedures.