An automatic ranging device for optical instruments focuses two images of at least a portion of the field of view of the instrument on an array of photosensitive cells. The electronic output of the individual cells is related to the intensity of the light impinging thereon. The electronic output corresponding to the first image is compared with the electronic output corresponding to the second image. The relative location of corresponding portions of the first and second images is a measure of the range to the object which is imaged. Electronic circuitry determines the location at which image coincidence occurs and controls the focus of the optical instrument accordingly.