The rapid proliferation of Internet of Things (IoT) devices and the increasing demand for low-latency communication and high-performance applications have brought forth the emergence of fog computing as a viable solution. Fog computing leverages the proximity of fog nodes to the edge of the network to offload computational tasks from resource-constrained devices, enabling efficient resource management and real-time capabilities. The current work aims to explore the concept of task offloading in fog computing and its potential to improve application performance along with task offloading algorithm, with a focus on addressing challenges such as, response time, limited bandwidth, energy consumption etc. The goal of this research is to develop novel approaches and methodologies for task offloading in fog computing. Through theoretical analysis, simulations, and practical implementation, this research aims to enhance the understanding and effectiveness of task offloading techniques in fog computing environments.