A method for locating a guide wire axis on a femoral neck comprises the steps of tracking a position and orientation of a femur registering a frame of reference with respect to the position and orientation of the femur from a first registration probe mounted onto the femur in a predetermined configuration, the frame of reference having preoperative planned data pertaining to the femoral neck digitizing femoral neck data with respect to the position and orientation of the femur from a second registration probe positioned onto the femoral neck at desired orientations calculating a position and orientation of the guide wire axis with respect to the position and orientation of the femur as a function of the preoperative planned data and the femoral neck data.