This formula is almost self-evident (if you take time to think about it)!
GDP is a measure of all the goods and services produced domestically. Therefore, to calculate the GDP, one only needs to add together the various components of the economy that are a measure of all the goods and services produced.
Many of the goods and services produced are purchased by consumers. So, what consumers spend on them (C) is a measure of that component.
The next component is the somewhat mysterious quantity "I," or investment made by industry. However, this quantity is mysterious only because investment does not have its ordinary meaning. When calculating the GDP, investment does NOT mean what we normally think of in the case of individuals. It does not mean buying stocks and bonds or putting money in a savings account (S in the diagram). When calculating the GDP, investment means the purchases made by industry in new productive facilities, or, the process of "buying new capital and putting it to use" (Gambs, John, Economics and Man, 1968, p. 168). This includes, for example, buying a new truck, building a new factory, or purchasing new software. This is indicated in the diagram by an arrow pointing from one factory (enterprise) to another. In essence, it shows the factory "reproducing itself" by buying new goods and services that will produce still more new goods and services. NOTE: There is a money-flow relationship between personal savings, S, and investment, I, but this does not figure directly in calculating the GDP. See Exercise 3 below. The next component is E, or the difference between the value of all exports and the value of all imports. If Exports exceeds imports, it adds to the GDP. If not, it subtracts from the GDP. Thus, even if a nation's people work very hard to produce products for exports, but still import more than they export, the nation's GDP will be negatively impacted. This is one of the reasons trade deficits are frequently a political target. Because the balance of trade can be either positive or negative, we can rewrite the equation, showing the components of E, using X for Exports and M for Imports:
Y = C + I + (X - M)+ G
You may see the formula for the GDP written this way, and it may be easier for you to remember in this format.
The final component is G. The government buys (with your tax money) goods and services (G). These purchases are a measure of those goods and services produced. Be aware that many people make the mistake of thinking that the money paid in taxes and spent by the government is "lost" and therefore subtracts from the GDP. Tax money may indeed be spent inefficiently but this fact has no bearing on the calculation of the GDP.