Energy efficiency is a critical concern in wireless sensor networks (WSNs) due to the limited power resources available in sensor nodes. Prolonging network lifespan while ensuring reliable data transmission is essential for successful deployment in various applications, such as environmental monitoring, military operations, and industrial automation. This paper presents a mathematical model designed to optimize energy consumption across various nodes in WSNs. By implementing simulations and analyzing data from these models, the study demonstrates significant improvements in extending network lifespan while maintaining reliable data throughput. The findings contribute valuable insights into energy management for large-scale sensor deployments.