To quantitatively study the distribution curve of CNC machines, the Weibull linear regression using the failure data of CNC machines is analyzed. As the result of analyzing WPP(Weibull probability plot), the failure rate distribution curve which includes early failure period and random failure period is established by piecewise twofold Weibull model. The establish method of the model and the process of parameter estimated by maximum likelihood are explained. The correctness of the model is verified by comparing the lasting time of early failure period with the actual situation. The optimization warranty of CNC machines is obtained by an object function which is established by the model.