Provided is a method of measuring a heart rate in an electronic device. The method includes obtaining a face image of a subject by using the electronic device; determining a target region within the obtained face image; analyzing color information within the determined target region; and determining a heart rate of the subject on the basis of the analyzed color information. The analyzing of color information is performed on the basis of a differential arithmetic operation between a first color component and a second color component within the target region.