Calculate the frequency offset in the correct direction.