An electronic device includes: a display layer; a display driver configured to generate a horizontal synchronization signal and a vertical synchronization signal for driving the display layer; a sensor layer on the display layer; and a sensor driver configured to receive the horizontal synchronization signal and the vertical synchronization signal from the display driver, and to operate, based on the horizontal synchronization signal and the vertical synchronization signal, in a first mode in which a first input generated by an active pen is detected or a second mode in which a second input generated by a touch is detected.