Capacitive voltage transformer (CVT) is greatly affected by stray capacitance and inductance of compensating reactor when it is used for harmonic measurement. During the research process, it was found that influencing factors such as stray capacitance can cause harmonics when the value is not accurate.Wave measurement results introduce additional errors.In order to reduce the CVT harmonic measurement error, a method for optimizing CVT input parameters based on the function mapping relationship is proposed. The method is based on the minimum error of the calculation result and the maximum confidence of the input parameter as the goal.In order to meet the requirements of amplitude and phase shift minimum error, the input parameter combination with the greatest confidence is selected, and the input parameters are evaluated based on the measurement uncertainty. Finally, the validation and analysis of actual cases prove the rationality and effectiveness of the method.