Antenna Gain and Directivity are two terms that are sometimes not that well understood. The Antenna Gain and Directivity are related through the following equation.
G(θ,φ)=E*D(θ,φ)
That is, the Antenna Gain in a particular direction is equal to the Directivity in that direction multiplied by the Antenna Efficiency. Antenna Directivity is the ratio of energy transmitted (or received) by the antenna in a particular direction to the energy transmitted (or received) in that direction by an isotropic source. This is also known as the Directive Gain.
The Antenna Gain (also known as the Power Gain) seems to be a better metric to quantify the performance of an antenna as it takes into account the efficiency in converting electrical energy supplied to the antenna into radiated energy.
The 3-dimensional plot of the Gain of an antenna is known as the radiation pattern. The Antenna Gain with reference to an isotropic source is given in dBi (decibel above isotropic source). Sometimes the Antenna Gain is given with reference to a Dipole Antenna and is labelled as dBd. The figure below shows the Directivity of a Patch Antenna embedded inside a human body [1].

Note:
1. An isotropic source (a source that radiates uniformly in all directions) is only a theoretical concept and does not exist in reality.
2. The sun can be considered an isotropic radiator since it radiates uniformly in all directions (almost).
3. When no direction is given the Gain refers to the maximum Gain.
Reference:
[1] http://www.hindawi.com/journals/ijap/2008/167980/
Author: John (YA)
John has over 20 years of Research and Development experience in the field of Wireless Communications. He has worked for a number of companies around the world including Qualcomm Inc. USA.
I need difference between dirctivity, gain and efficiency of antenna
Gain = Efficiency * Directivity
Basically this means that Gain takes into account the losses in radiation whereas Directivity does not.
https://www.quora.com/What-is-the-difference-between-Directivity-and-Antenna-Gain
very good explanation
do you know how to obtain this formula dB=20 log E/50micro v/m and E= roof (30.Wt.D)/d where E is the fieldstrength electivity, Wt=transmitter power,D=constanta directivity,d=distance…
and what is the relationship between directivity and gain.