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). Nominal value changes due to shifts in quantity and price.