An electronic device comprising: a communication unit ; a light source configured to emit light of a predetermind frequency chosen among a plurality of frequencies that can be emitted using the light source; an image sensor configured to acquire reflected light reflected from an external object received the emitted light; a processor , wherein the processor is configured to receive an input to measure a distance to the external object, in response to the input, identify whether the communication unit is activated, in response to the identification that the communication unit is activated, select a first frequency among the plurality of frequencies, wherein a frequency used by the activated communication unit is distinguished from the first frequency, acquire information on a distance between the electronic device and the external object, based on a time from emission of the light of the first frequency to the external object through the light source to reception of the reflected light of the first frequency reflected from the external object by the image sensor, and acquire corrected distance information by applying an offset value calculated for a reference frequency of the first frequency to the acquired distance information, wherein the reference frequency is one frequency among the plurality of frequencies, which in response to the identification that the communication unit is deactivated is used to acquire information on a distance between the external object and the electronic device, based on a time from emission of the light of the reference frequency to the external object through the light source to reception of the reflected light of the reference frequency reflected from the external object by the image sensor. a communication unit ; a light source configured to emit light of a predetermind frequency chosen among a plurality of frequencies that can be emitted using the light source; an image sensor configured to acquire reflected light reflected from an external object received the emitted light; a processor , wherein the processor is configured to receive an input to measure a distance to the external object, in response to the input, identify whether the communication unit is activated, in response to the identification that the communication unit is activated, select a first frequency among the plurality of frequencies, wherein a frequency used by the activated communication unit is distinguished from the first frequency, acquire information on a distance between the electronic device and the external object, based on a time from emission of the light of the first frequency to the external object through the light source to reception of the reflected light of the first frequency reflected from the external object by the image sensor, and acquire corrected distance information by applying an offset value calculated for a reference frequency of the first frequency to the acquired distance information, wherein the reference frequency is one frequency among the plurality of frequencies, which in response to the identification that the communication unit is deactivated is used to acquire information on a distance between the external object and the electronic device, based on a time from emission of the light of the reference frequency to the external object through the light source to reception of the reflected light of the reference frequency reflected from the external object by the image sensor. <EOS>