We present a fresh approach to the mathematical computation of apparent resistivities in electrical prospecting. The method is based on an exponential approximation of the kernel function which reduces the integral equation for the potential over a layered earth to a simple algebraic equation. The coefficients in the approximation are obtained using a least-squares inversion technique. A single, unified matrix equation allows computation of apparent resistivity values for arbitrary four-electrode arrays over a layered earth. The unified G function automatically reduces to that of a symmetrical four-electrode array and dipole array function with the proper interelectrode separation. Computations for some two-, three-, and four-layer earth models (Schlumberger configuration), along with a few Wenner and radial dipole apparent resistivity values, demonstrate the versatility of this unified equation.