This paper presents an interpolation algorithm for non-uniform rational B-spline (NURBS) curves. A real-time look-ahead function is introduced to deal with the abrupt change of feedrate. In the proposed algorithm, feedrate can be adaptively adjusted according to the radius of curvature of curves. Dynamic characteristic of machine tools is considered while the feedrate is adjusted. The experimental results show that this algorithm significantly reduced the machining error brought about by the instantaneous acceleration fluctuations of machine tools.