An inertial sensor based surgical navigation system for knee replacement surgery is disclosed. Inertial sensors composed of six-degree-of-freedom inertial chips, whose measurements are processed through a series of integration, quaternion, and kalman filter algorithms, are used to track the position and orientation of bones and surgical instruments. The system registers anatomically significant geometry, calculates joint centers and the mechanical axis of the knee, develops a visualization of the lower extremity that moves in real time, assists in the intra-operative planning of surgical cuts, determines the optimal cutting planes for cut guides and the optimal prosthesis position and orientation, and finally navigates the cut guides and the prosthesis to their optimal positions and orientations using a graphical user interface.