The purpose of the present invention is to provide an electronic device capable of presenting appropriate haptic feedback under various usage conditions. An electronic device according to an embodiment includes: a touch panel to be touched by a user; a touch detecting unit (31) for detecting touching of the touch panel by the user; a vibration unit (13) for vibrating the touch panel; a driving unit (34) for driving the vibration unit with a first drive signal of a first frequency range and with a second drive signal of a second frequency range higher than the first frequency range; a vibration detecting unit (32) for detecting vibration of the touch panel when vibrated according to driving based on the second drive signal and outputting a detection signal; and a drive frequency determining unit (33) for determining the frequency of the first drive signal on the basis of the detection signal.