The paper presents optimization of power line geometrical parameters aimed to reduce the intensity of the electric field and magnetic field intensity under an overhead power line with the use of a genetic algorithm (AG) and particle swarm optimization (PSO). The variation of charge distribution along the conductors as well as the sag of the overhead line and induced currents in earth wires were taken into account. The conductor sag was approximated by a chain curve. The charge simulation method (CSM) and the method of images were used in the simulations of an electric field, while a magnetic field were calculated using the Biot–Savart law. Sample calculations in a three-dimensional system were made for a 220 kV single – circuit power line. A comparison of the used optimization algorithms was made.