An electronic device comprising: a housing; a touchscreen display including a touch sensor; an ultrasonic fingerprint sensor comprising a temperature measuring sensor; a pressure sensor; at least one processor operatively coupled with the touchscreen display, the ultrasonic fingerprint sensor, the pressure sensor and the touch sensor; and at least one memory operatively coupled with the at least one processor, and configured to store at least a first reference fingerprint image corresponding to a first reference temperature, relating to authentication using the ultrasonic fingerprint sensor, wherein the ultrasonic fingerprint sensor is configured to be disposed inside the housing and to overlap one area of the touchscreen display, when viewed from above a surface of the housing; wherein the at least one memory is configured to store instructions that, when executed, cause the at least one processor to control the electronic device to: identify that a current temperature is not in a range of a reference temperature corresponding to any reference fingerprint image stored in the memory, using the temperature measuring sensor; identify that no foreign substance is present on a surface of the touchscreen display, using at least one of the pressure sensor and the touch sensor; and determine to calibrate the ultrasonic fingerprint sensor based on identifying that the current temperature is not in the range of a reference temperature corresponding to any reference fingerprint image stored in the memory and the foreign substance is not present on the surface of the touchscreen display; perform the calibration by obtaining an ultrasonic pattern image from the touchscreen display and generating a first calibration fingerprint image corresponding to the current temperature by synthesizing at least part of the obtained ultrasonic pattern image and at least part of the first reference fingerprint image corresponding to the first reference temperature; and store the first calibration fingerprint image in the at least one memory. a housing; a touchscreen display including a touch sensor; an ultrasonic fingerprint sensor comprising a temperature measuring sensor; a pressure sensor; at least one processor operatively coupled with the touchscreen display, the ultrasonic fingerprint sensor, the pressure sensor and the touch sensor; and at least one memory operatively coupled with the at least one processor, and configured to store at least a first reference fingerprint image corresponding to a first reference temperature, relating to authentication using the ultrasonic fingerprint sensor, wherein the ultrasonic fingerprint sensor is configured to be disposed inside the housing and to overlap one area of the touchscreen display, when viewed from above a surface of the housing; wherein the at least one memory is configured to store instructions that, when executed, cause the at least one processor to control the electronic device to: identify that a current temperature is not in a range of a reference temperature corresponding to any reference fingerprint image stored in the memory, using the temperature measuring sensor; identify that no foreign substance is present on a surface of the touchscreen display, using at least one of the pressure sensor and the touch sensor; and determine to calibrate the ultrasonic fingerprint sensor based on identifying that the current temperature is not in the range of a reference temperature corresponding to any reference fingerprint image stored in the memory and the foreign substance is not present on the surface of the touchscreen display; perform the calibration by obtaining an ultrasonic pattern image from the touchscreen display and generating a first calibration fingerprint image corresponding to the current temperature by synthesizing at least part of the obtained ultrasonic pattern image and at least part of the first reference fingerprint image corresponding to the first reference temperature; and store the first calibration fingerprint image in the at least one memory.