We present a numerical method for calculating the electrostatic potential of molecules in solution, using the linearized Poisson-Boltzmann equation. The emphasis in this work is on applications to biological macromolecules. The accuracy of the method is assessed by comparisons with analytic solutions for the case of a single charge in a dielectric sphere (Tanford-Kirkwood theory), which serves as a model for a macromolecule. We find that the solutions are generally accurate to within 5%. Larger errors occur close to the charge and the dielectric boundary, but the maximum error found at ion-bonding distance (3 Å) from a charge close to the boundary (1 Å deep) is only