To calculate the electric field generated by a charge distribution, it is often easier to first calculate the electrostatic potential. The advantage of the electric potential is that it is a scalar:

The total electric potential generated by a charge distribution is algebraic sum of the electric potential due to each component of this distribution.

The total electric potential can then be used to calculate the electric field.

The electric field can be calculated directly, by carrying out vector addition of the electric field generated by each component of this distribution. However, in general summing vectors is more complicated then summing scalars.