The present disclosure provides an electronic apparatus. The electronic apparatus includes a sensor and a processor electrically connected to the sensor and configured to generate information indicating a start of an activity when first data indicating that an activity of the electronic apparatus occurs is received from the sensor and generate information indicating a start of an exercise when second data indicating that the activity is associated with the exercise is received from the sensor.