The concept of the Internet of Things (IoT) has received much attention over the last five years. It is predicted that the IoT will influence every aspect of our lifestyles in the near future. The Wireless Sensor Network (WSN) is one of the key enablers of the operation of IoTs, allowing data to be collected from the surrounding environment. A sensor network consists of a large number of battery-driven sensor nodes which have a limited capability to sense, compute and communicate with each other in a speciﬁc location for a speciﬁc purpose. However, due to limited resources, the nature of deployment, and unattended operation, WSNs are vulnerable to several types of attack. Security is paramount for reliable and safe communication between IoT embedded devices. It has become essential to many IoT applications, but it does, however, come at a cost to resources. Nodes are usually equipped with small batteries, which makes energy conservation crucial to WSNs. Therefore, traditional security services such as encryption, authentication and key exchange mechanisms, which incur a high overhead on sensor node resources, cannot be applied directly in WSNs. Nevertheless, security cost in terms of energy consumption has not been studied sufficiently. Numerous researches have used a security specification of 802.15.4 for IoT applications, but the energy cost of each security level and the impact on Quality of Services (QoS) parameters remain unknown. This research focuses on the cost of security at the IoT Media Access Control (MAC) layer. It begins by studying the energy consumption of IEEE 802.15.4 security levels, continues with an evaluation of the impact of security on data latency and throughput, and then presents the impact of transmission power on security overhead, and finally, shows the effects of security on memory footprint. The Cooja emulator, which comes with Contiki Operating System (OS), and Tmote Sky nodes are used to obtain the results in this paper. The employed MAC protocol affects the cost measurement, hence, for accuracy, the effects of MAC and Radio Duty Cycle protocols on the security cost have been excluded. The results show that security overhead in terms of energy consumption with a payload of 24 bytes fluctuates between 31.5% at minimum level over non-secure packets and 60.4% at the top security level of 802.15.4 security specification. Also, it shows that security cost has less impact at longer frame lengths, and more with smaller frame size. In addition, the results depict a significant impact on data latency and throughput. Overall, maximum authentication length decreases throughput by almost 53%, and encryption and authentication together by almost 62%. Finally, the results show how security cost is affected by transmission power. It demonstrates that Microcontroller Unit (MCU) overhead become more visible, in comparison to the radio cost, when the transmission power is reduced and affects overall energy consumption. The overall security cost will be higher with low transmission power. The results of this research are aimed to benefit network designers and researchers in terms of security cost, and allow them to choose the level which suits their application requirements.