Formulation optimization plays an important role in the research and development of chemically amplified resist (CAR). However, the CAR profile after development process is influenced by multiple resist parameters and process conditions, so it is hard to determine the optimal CAR formulation in the multivariate problem. An optimization method for the CAR formulation is developed. The simple random sampling is applied to each CAR parameter's value range independently, and the combinations of these samples from different parameters are used in the simulation of lithography profiles. Kernel density estimation is applied to analyze the simulation results. Then the CAR formulation is optimized based on the probability density distribution from the analysis results. The verification results show that the proposed optimization method can greatly improve the stability of the CAR formulation and thus generating acceptable critical features' sizes of the CAR profile.