Direct-current resistivity surveys usually are performed using steel rods of finite extent and grounding resistance. However, in modeling, electrodes are commonly treated as ideal point sources. We present an approach for numerical computation applying the complete electrode model (CEM), which is known from medical imaging. The electrode surface was discretized, and the partial-differential equations were extended by additional relations incorporating a contact impedance and a condition for the current flow through the electrode surface. We verified the modeling of the electrical potential using an analytical solution for a perfectly coupled half-ellipsoid current source. To quantify the influence of a finite electrode, we computed the electrode effect as the ratio between CEM and point-source solution and investigated its dependence on geometry and contact impedance. Surface measurements using rods of typical spatial extent showed electrode effects on the order of the measuring accuracy for an electrode length/spacing ratio lower than 0.2. However, the effects are more significant for closed geometries such as experimental tanks. A comparison with a point approximation for finite electrodes using point-source locations along the electrode axis showed the best agreement, with points at about 60% of the electrode extension. The contact impedance played a minor role for four-point measurements, contributing only a few percent to the electrode effect. In addition to penetrating electrodes, we investigated surface electrodes with galvanic or capacitive coupling, showing electrode effects on the same order as for penetrating electrodes. An inhomogeneous resistivity distribution clearly increased the size of the effects. We also investigate the use of CEM to simulate current injected through steel-cased boreholes. Finally, we applied the approach with buried ring electrodes to calculate effects caused mainly by geometric disturbances from the borehole.