said by seagreen:please provide with the formula to calculate the gain of the antenna in dBi ...
Not sure that is even a valid question. The gain of an antenna is a factor of it's physical construction, and not something that would be deduced by a mathematical formula. The amount of gain and the shape of the envelope are factors of reflective surface area and it's relative angles, active element characteristics, apex distances and etc. There are certainly formulas used at the manufacturing level as guides for a new design, but the actual gain of an antenna is authoratively determined by radiation pattern measurements in a laboratory environment. If the question was actually "What is the formula to determine the difference between DBi and DBd", the answer is add 2.2 to the DBi value.