A device (25) for drilling holes in bone and configured to determine bone screw length, the device (25) including a surgical power drill (2) comprising: a) a housing (12) and; b) a measuring device (1) releasably attached or fixed to the housing (12), wherein the measuring device (1) is configured to measure the distance (x) covered by the housing (12) in the direction of the longitudinal axis (7) and relative to a surface of an implant (26) or a bone during a drilling process, wherein the measuring device (1) comprises a processing unit (14) to record the distance (x) covered with respect to time; the processing unit (14) comprises one or more differentiators to determine at least the first and second derivatives of the distance (x) covered with respect to time; and the processing unit (14) further comprises a peak detector to analyze one or more peaks occurring in the graph of the highest derivative with respect to time, and wherein the measuring device (1) comprises a laser device or an ultrasound position sensor for displacement assessment.