A three-dimensional finite-element computer algorithm which can accommodate arbitrarily complex topography and subsurface structure has been developed to model the resistivity response of the earth. The algorithm has undergone extensive evaluation and is believed to provide accurate results for realistic earth models. Testing included comparison to scale-model measurements, analytically calculated solutions, and results calculated numerically by other independent means. Computer modeling experiments have demonstrated that it is possible to remove the effect of topography on resistivity data even under conditions where such effects are large with respect to the subsurface responses. This can be done without resorting to lengthy and costly trial-and-error computer modeling. After correction, the data can be interpreted as if the anomalies are due only to subsurface structure. The results of case studies on field data measured in high-relief topography indicate the following. (1) Pre- or postsurvey 3-D computer analyses of topographic effects are worthwhile and can be done for a small fraction of the survey cost. (2) Three-dimensional terrain corrections can significantly improve the quality of subsurface interpretation in terrain geometries which cannot be modeled with a 2-D algorithm. (3) Terrain effects on collinear electrode arrays can be minimized by alignment of the arrays parallel to the strike of the topography (that is, along streamlines and ridgelines). The computing cost of performing 3-D analyses is relatively small compared to the man-hour costs required to implement them. The total cost of a 3-D terrain correction is typically small compared to the survey cost, especially if one uses the new generation of large mainframe computers.