Background: Deep brain stimulation (DBS) of the subthalamic nucleus produces variable effects in Parkinson disease. Variation may result from different electrode positions relative to target. Thus, precise electrode localization is crucial when investigating DBS effects. New method: We developed a semi-automated method, Electrode Shaft Modeling in CT images (ESM-CT) to reconstruct DBS lead trajectories and contact locations. We evaluated methodological sensitivity to operator-dependent steps, robustness to image resampling, and test-retest replicability. ESM-CT was applied in 56 patients to study electrode position change (and relation to time between scans, postoperative subdural air volume, and head tilt during acquisition) between images acquired immediately post-implantation (DBS-CT) and months later (DEL-CT). Results: Electrode tip localization was robust to image resampling and replicable to within ∼ 0.2 mm on test-retest comparisons. Systematic electrode displacement occurred rostral-ventral-lateral between DBS-CT and DEL-CT scans. Head angle was a major explanatory factor (p < 0.001,Pearson’s r = 0.46, both sides) and volume of subdural air weakly predicted electrode displacement (p = 0.02,r = 0.29:p = 0.1,r = 0.25 for left:right). Modeled shaft curvature was slightly greater in DEL-CT. Magnitude of displacement and degree of curvature were independent of elapsed time between scans. Comparison with Existing Methods: Comparison of ESM-CT against two existing methods revealed systematic differences in one coordinate (1 ± 0.3 mm,p < 0.001) for one method and in three coordinates for another method (x:0.1 ± 0.1 mm, y:0.4 ± 0.2 mm, z:0.4 ± 0.2 mm, p < 10−10). Within-method coordinate variability across participants is similar. Conclusion: We describe a robust and precise method for CT DBS contact localization. Application revealed that acquisition head angle significantly impacts electrode position. DBS localization schemes should account for head angle. © 2018 Elsevier B.V.