If anyone cares the math is not that hard to follow:
You take the transmitter output power, subtract any loss in the cable between the transmitter and the antenna, add the gain of the anteana. http://db.osoal.org.nz/eirp-calculator.html [osoal.org.nz]
Then you have to subtract the free space loss of your path ( the loss you get by putting the signal across the air ): http://db.osoal.org.nz/freespace-loss-calculator.h tml [osoal.org.nz]
And finally you add the recieve gain of the receiving antenna, subtract the loss from the cable on the recieving end and compare with the receive sensitivity of your wireless receiver. I have bundled the rest of the calculation into this bit of javascript. [osoal.org.nz]
For example, if I have two 2.4ghz radios that output 15dbm (32mw) that have a recieve sensitivity of -83db that are in waterproof boxes on the antenna mounting connected to two 22db antenna's 5km apart very roughly.
15db - 1db 22db = 36db or ~3981mw (just under the 4 watt max).
- 121.65db for our free space loss
22db - 1db = -64.65
-64.65 is the strength of the signal received at the other end, fortunately the receiver has a receive sensitivity of -83 so we are in business. There is a link margin of ~19db to account for a little bit of noise, fade, solar flares, alien abductions etc.
If you want more range, increase the power of the transmitter or the gain of your antenna. The government limits ( 4 watts for 2.4ghz, 250mw for 5.3ghz and 4 watts for 5.8Ghz in New Zealand ) are going to determine your maximum range barring some magical new wireless gear that has a better receive sensitivity.