A method for determining whether a module is mounted and an electronic device performing the same are provided. The electronic device includes a pressure sensor configured to detect barometric pressure inside the electronic device, a module mounting structure configured to mount a module, and a processor configured to determine whether or not the module is mounted in the module mounting structure, based on the variation in the detected pressure. In an embodiment, the pressure sensor is a barometric pressure sensor that detects variations in barometric pressure.