# DataSet Structure: Gain

Gain is calculated in the same way as directivity, except that the input power is used rather than the radiated power. In other words, system losses are taken into account.

The formula used to calculate gain is

(1) $G=\text{GainFactor}×\left[\text{Re}{\left({E}_{\theta }\right)}^{2}+\text{Im}{\left({E}_{\theta }\right)}^{2}+\text{Re}{\left({E}_{\varphi }\right)}^{2}+\text{Im}{\left({E}_{\varphi }\right)}^{2}\right]$