A lipid and carbohydrate energy metabolism measurement method based on heart rate, a wearable electronic device and a computer program product are disclosed, the method comprising: a data input step using an input module to input a maximum oxygen intake a heartbeat sensing step using a heartbeat sensor to sense a current heart rate and a calculation step using a processor to calculate an energy metabolism result according to the maximum oxygen intake and the current heart rate. The electronic device comprises an input module, a heartbeat sensor, a processor, and a memory module. The input module inputs a maximum oxygen intake. The heartbeat sensor senses a current heart rate. The processor, according to the maximum oxygen intake and the current heart rate, calculates to obtain a result of energy metabolism. The computer program product may be executed to implement the above-mentioned method.