The invention provides a constant power compensation method, which is applied to an AC/DC controller. The AC/DC controller includes a rectifier bridge, a filter capacitor, an inductor, an oscillator,a logic controller, a compensation resistor, a power transistor, a drive circuit, an over-current comparator, a sampling resistor, a sampling circuit and a voltage/current converter. The constant power compensation method includes the steps of collecting the sawtooth wave voltage of the oscillator and holding and sending the collected sawtooth wave voltage to the voltage/current converter. According to the method, the constant power compensation value is kept unchanged in a certain time range instead of transiently changing with the AC/DC drive switching signal, and the occurrence of sub-harmonic oscillation is suppressed.