Provided are an electronic device and a pulse rate calculation program that are capable of improving pulse rate measurement accuracy. The electronic device (10) has an acquisition unit (18), a first calculation unit (19), a second calculation unit (20), a judgment unit (21), a determination unit (22), and a correction unit (23). The acquisition unit (18) obtains pulse wave data from an optical sensor and obtains acceleration data from an acceleration sensor. The first calculation unit (19) calculates pulse rates from the pulse wave data. The second calculation unit (20) calculates the number of steps from the acceleration data. The judgment unit (21) judges whether or not the pulse rate at the current point in time fulfils a prescribed condition on the basis of the number of steps, if the amount of change in the pulse rate is at least a prescribed threshold value. The determination unit (22) determines whether or not to use, as the pulse rate after a change point in time at which the amount of change in the pulse rate is at least the prescribed threshold value, either the pulse rate immediately prior to the change point in time or the pulse rate at the current point in time, making said determination in accordance with the judgment results. The correction unit (23) corrects the pulse rate on the basis of the determined pulse rate.Linvention concerne un dispositif électronique et un programme de calcul de la fréquence du pouls qui sont aptes à améliorer la précision de mesure de la fréquence du pouls. Le dispositif électronique (10) comprend une unité dacquisition (18), une première unité de calcul (19), une seconde unité de calcul (20), une unité dévaluation (21), une unité de détermination (22), et une unité de correction (23). Lunité dacquisition (18) obtient des données donde de pouls à partir dun capteur optique et obtient des données daccélération à partir dun capteur daccélération. La première unité de calcul (19) calcule les fréquences du pouls à partir des d