An air conditioner comprising: a refrigerant circuit in which a compressor, an outdoor heat exchanger, an expansion valve, and an indoor heat exchanger are connected together, and through which HFC32 circulates as a refrigerant to perform a refrigeration cycle; an outdoor heat exchanger temperature sensor configured to detect the temperature of the refrigerant in the outdoor heat exchanger, wherein the temperature detected by the outdoor heat exchanger temperature sensor corresponds to the condensing temperature (Tc) of the refrigerant during cooling operation and the evaporating temperature (Te) during heating operation; an indoor heat exchanger temperature sensor configured to detect the temperature of the refrigerant in the indoor heat exchanger, wherein the temperature detected by the indoor heat exchanger temperature sensor corresponds to the evaporating temperature (Te) of the refrigerant during cooling operation and the condensing temperature (Tc) during heating operation; a discharge pipe temperature sensor configured to measure a discharge pipe temperature (Tp) of the refrigerant discharged from the compressor; and a controller which performs an opening degree control every predetermined period to change the opening degree of the expansion valve to a predetermined extent such that the discharge pipe temperature (Tp) of the refrigerant discharged from the compressor reaches a target discharge pipe temperature (Tpa), wherein the controller is configured to set the target discharge pipe temperature (Tpa) based on the condensing temperature (Tc) and the evaporating temperature (Te) which are respectively detected by the outdoor heat exchanger temperature sensor and the indoor heat exchanger temperature sensor and is configured to set the predetermined extent based on the temperature measured by the discharge pipe temperature sensor, characterized in that the controller is configured such that the predetermined period is longer in a range where the opening degree of the expansion valve is less than a predetermined value (Px) than in a range where the opening degree is equal to or more than the predetermined value (Px) such that the smaller the opening degree of the expansion valve is, the longer the predetermined period is set to be, and the discharge pipe temperature sensor is configured to measure the discharge pipe temperature (Tp) every predetermined period. a refrigerant circuit in which a compressor, an outdoor heat exchanger, an expansion valve, and an indoor heat exchanger are connected together, and through which HFC32 circulates as a refrigerant to perform a refrigeration cycle; an outdoor heat exchanger temperature sensor configured to detect the temperature of the refrigerant in the outdoor heat exchanger, wherein the temperature detected by the outdoor heat exchanger temperature sensor corresponds to the condensing temperature (Tc) of the refrigerant during cooling operation and the evaporating temperature (Te) during heating operation; an indoor heat exchanger temperature sensor configured to detect the temperature of the refrigerant in the indoor heat exchanger, wherein the temperature detected by the indoor heat exchanger temperature sensor corresponds to the evaporating temperature (Te) of the refrigerant during cooling operation and the condensing temperature (Tc) during heating operation; a discharge pipe temperature sensor configured to measure a discharge pipe temperature (Tp) of the refrigerant discharged from the compressor; and a controller which performs an opening degree control every predetermined period to change the opening degree of the expansion valve to a predetermined extent such that the discharge pipe temperature (Tp) of the refrigerant discharged from the compressor reaches a target discharge pipe temperature (Tpa), wherein the controller is configured to set the target discharge pipe temperature (Tpa) based on the condensing temperature (Tc) and the evaporating temperature (Te) which are respectively detected by the outdoor heat exchanger temperature sensor and the indoor heat exchanger temperature sensor and is configured to set the predetermined extent based on the temperature measured by the discharge pipe temperature sensor, characterized in that the controller is configured such that the predetermined period is longer in a range where the opening degree of the expansion valve is less than a predetermined value (Px) than in a range where the opening degree is equal to or more than the predetermined value (Px) such that the smaller the opening degree of the expansion valve is, the longer the predetermined period is set to be, and the discharge pipe temperature sensor is configured to measure the discharge pipe temperature (Tp) every predetermined period.