Fog computing can be used to offload computationally intensive tasks from battery powered Internet of Things (IoT) devices. Although it reduces energy required for computations in an IoT device, it uses energy for communications with the fog. This paper analyzes when usage of fog computing is more energy efficient than local computing. Detailed energy consumption models are built in both scenarios with the focus set on the relation between energy consumption and distortion introduced by a Power Amplifier (PA). Numerical results show that task offloading to a fog is the most energy efficient for short, wideband links.