A method for estimating leg length and offset, comprises registering an anatomic coordinate frame associated with a patients pelvis. The method also comprises measuring a first position of a femur relative to the patients pelvis. The method further comprises receiving, from magnetic and orientation sensors, information indicative of a change in a position of the femur relative to the pelvis of the patients pelvis. Alternatively, the method further comprises receiving, from light and orientation sensors, information indicative of a change in a position of the femur relative to the pelvis of the patients pelvis. The method also comprises determining at least one of a leg length and an offset based on the first position and the change in position.