An electronic device, according to one embodiment of the present invention, comprises: a housing comprising a conductive part, and a first nonconductive part connected to the conductive part; an antenna structure positioned inside the housing and comprising a
printed circuit board and at least one
antenna element, the
printed circuit board comprising a first surface, and a second surface facing the opposite direction from the first surface, and the at least one
antenna element being positioned inside the
printed circuit board closer to the first surface than the second surface, or on the first surface; and a pen
input device attachable / detachable to / from the housing, wherein, when considering the direction in which a main beam of the antenna structure is radiated, in a state where the pen
input device is attached to the housing, the pen
input device comprises a second nonconductive part having at least a portion thereof overlapping with the first nonconductive part, and at least a portion of the at least one
antenna element may overlap with the first nonconductive part and the second nonconductive part. Other various embodiments are possible.