An electronic device comprising: a detection circuit; and a processor operatively connected to the detection circuit, wherein the processor is configured to: obtain (401, 601) a first signal associated with an external object through the detection circuit; obtain (403, 607) a first heart rate, HR, using a first filter having an attribute of a first frequency band and obtain (405, 609) a second HF, using a second filter having an attribute of a second frequency band, based at least on the first signal; change at least some attributes associated with the second filter, based at least on the first HR and the second HR; obtain a second signal associated with the external object through the detection circuit; obtain a third HR, using the second filter in which at least some attributes are changed, based on the second signal and generate (407, 621) heart rate variability, HRV, information, based on the third HR, wherein the electronic device is characterized by that the second frequency band is a frequency band wider than the first frequency band; and wherein the first filter and the second filter are band pass filters. a detection circuit; and a processor operatively connected to the detection circuit, wherein the processor is configured to: obtain (401, 601) a first signal associated with an external object through the detection circuit; obtain (403, 607) a first heart rate, HR, using a first filter having an attribute of a first frequency band and obtain (405, 609) a second HF, using a second filter having an attribute of a second frequency band, based at least on the first signal; change at least some attributes associated with the second filter, based at least on the first HR and the second HR; obtain a second signal associated with the external object through the detection circuit; obtain a third HR, using the second filter in which at least some attributes are changed, based on the second signal and generate (407, 621) heart rate variability, HRV, information, based on the third HR, wherein the electronic device is characterized by that the second frequency band is a frequency band wider than the first frequency band; and wherein the first filter and the second filter are band pass filters. obtain (401, 601) a first signal associated with an external object through the detection circuit; obtain (403, 607) a first heart rate, HR, using a first filter having an attribute of a first frequency band and obtain (405, 609) a second HF, using a second filter having an attribute of a second frequency band, based at least on the first signal; change at least some attributes associated with the second filter, based at least on the first HR and the second HR; obtain a second signal associated with the external object through the detection circuit; obtain a third HR, using the second filter in which at least some attributes are changed, based on the second signal and generate (407, 621) heart rate variability, HRV, information, based on the third HR, wherein the electronic device is characterized by that the second frequency band is a frequency band wider than the first frequency band; and wherein the first filter and the second filter are band pass filters.