Axial distances between ocular structures can be measured by focusing an optical unit on focus planes corresponding to the ocular structures and using the distance between focus planes to determine the distance between the ocular structures. The method is particularly useful during eye surgery, e.g., cataract surgery, where the distance between ocular structures, particularly an aphakic pupil, can be used to more accurately predict the effective lens position for an intraocular lens.