According to one embodiment, an electronic device is configured to be worn by a user. The electronic device includes a sensor, a wireless transceiver, and a processor. The sensor measures vital data of the user. The wireless transceiver performs wireless communication with an external device. The processor selects a storage method of the vital data corresponding to strength of a signal transmitted from the external device and received by the wireless transceiver.