# Connection between saving and investments-Y=C+I+G+NX [duplicate]

I understand Y-G-C = I+NX = Savings . The equation that we see everywhere in economic textbooks. I see the mathematical logic.

BUT

Given that I = capital investment in GDP accounting surely Savings are what is not spent after you haven't spent anything on capital goods etc. So in my head Y-G-C-I = NX = S and infact why not take NX over to the other side!

What "mistake" am I making here? I can regurgitate the textbooks and get the marks but I just don't understand it for myself from first principles.

The $$I$$ is actually not just capital spending. In some models that might be true, for example, in Solow growth model we will assume that all investment is capital spending but $$I$$ is not just that.
For example, $$I$$ would include both purchases of new houses (although argument could be made they are capital goods, they would not satisfy more narrower definitions requiring that capital being factor of production), or investment in inventory for example (see more detailed explanation in Blanchard et al. Macroeconomics: a European Perspective, pp 41-43).
PS: As pointed in the comments, you should have minus in front of $$C$$ so the equation should be: $$Y-G-C = I+NX$$.