A D/A converter converting a digital signal having n bits (n is an integer) into an analog signal includes constant-current output circuits, provided for the n bits of the digital signal, for selectively generating n constant currents on the basis of the n bits of the digital signals. The n constant currents have mutually different current values with respect to the n bits of the digital signal. The constant-current output circuits have resistance elements respectively provided for the n bits of the digital signal. The resistance elements define the mutually different current values. The D/A converter also includes an output circuit for adding the n constant currents to each other and for outputting the analog signal based on an addition result, and a temperature-dependent voltage generating part for generating a temperature-dependent voltage which changes as a temperature around the D/A converter changes. Further, the D/A converter includes a current compensation part for generating a compensation voltage related to at least one of the resistance elements from the temperature-dependent voltage and for applying the compensation voltage to the one of the resistance elements. The compensation voltage compensates for a temperature-dependent variation in a characteristic of the one of the resistance elements.