The following equation is used to calculate the GDP: GDP = C + I + G + (X – M) or GDP = private consumption + gross investment + government investment + government spending + (exports – imports). ... It transforms the money-value measure, nominal GDP, into an index for quantity of total output.