A switching regulator has an input voltage detection circuit which inputs
a voltage applied to a rectifier diode 7 connected in series with the
secondary side of a transformer and generates a voltage signal Vvp
corresponding to the voltage, and a calculation unit which calculates a
voltage value Vin inputted to the primary side of the transformer based
on a voltage value of the voltage signal generated by the input voltage
detection circuit.