Single molecule localization microscopy (SMLM) techniques transcend the diffraction limit of visible light by localizing isolated emitters sampled stochastically. This time-lapse imaging necessitates long acquisition times, over which sample drift can become large relative to the localization precision. Here we present a novel, efficient, and robust method for estimating drift using a simple peak-finding algorithm based on mean shifts that is effective for SMLM in 2 or 3 dimensions.