Very roughly, every doubling of distance reduces received power and therefore theoretical data rate by a factor of 4. At 20 yards, I can get 2 Gbps out of my wifi, so at 5 miles, I can get 8 kbps with the same transmit power and antennas. Still plenty for instant messaging.