This paper describes the problem of calculating the electromagnetic field of power cables. From Maxwell’s equations, equations for calculating the magnetic field strength, magnetic induction and electric field strength due to currents in the phase conductors of a straight section of a cable line were derived. Based on the developed theoretical basis, a computer program was created for calculating the electromagnetic field of a straight section of a cable line. A total of five selected examples were solved using the computer program and the calculation results were analyzed. In the second chapter, the equations of the harmonic electromagnetic field, which follow from Maxwell’s equations for the harmonic field, are defined and described. In the third chapter, the numerical approximation of the longitudinal currents and potentials of the phase conductors of the considered straight section of a cable line is described. In the fourth chapter, the equations of the potential of the straight section of a cable line are derived. In the fifth chapter, the imaging of a point source of harmonic current located in the second layer of a two-layer medium is considered, where the first layer is air and the second layer is a homogeneous soil of known complex electrical conductivity. In the sixth chapter, the calculation of the magnetic field strength and magnetic induction of a straight section of an electric power cable line using the Biot-Savart law is presented in detail. The field is calculated in the plane of symmetry of the cable line section. In the seventh chapter, the algorithm for calculating the electric field strength of a straight section of an electric power cable line is described, assuming a grounded conductive cable screen. In the eighth chapter, a test example of a section of a single-core cable is solved, as well as selected examples of straight sections of a 10 kV and 35 kV cable line. The obtained results are graphically displayed and compared with the prescribed limit values of magnetic induction and electric field strength in air above the cable line section.