Internet of Things (IoT) devices possess limited resources, encompassing computing speed of microcontrollers, memory capacity, battery energy sources, and diverse computational requirements. The prevalent system architecture comprises two tiers, wherein IoT devices connect to the cloud to transmit data or receive commands, relying on a stable internet connection. However, in environments with restricted internet coverage and stability, this situation can become problematic, potentially leading to a reduction in Quality of Service (QoS). A viable solution to address this challenge involves the utilization of computation offloading techniques. This approach involves recognizing computation characteristics through specific rules, determining whether computations should take place at the IoT device layer, the edge computing layer, or within cloud computing. By implementing a multilayer three-tier scheme, the computation offloading process can be effectively optimized. Empirical testing conducted using the Pure Edge Sim simulator demonstrates that the amalgamation of IoT, Edge, and Cloud layers yields the most favorable outcomes for enhancing QoS.