Trend components often choose single form functions for fitting in the process of timing data modeling and analysis. Therefore, the fitting accuracy is difficult to improve for long timing data. As regard to this important problem, a piecewise fitting algorithm is implemented. Through the calculation of each order derivative of the timing data, the algorithm effectively divides the fitted timing data into a number of different patterns of subsequence. On this basis, corresponding fitting functions are chosen to fit each subsequence trend components respectively. Test results show that the new algorithm is feasible and effective.