# Why subtract imports when measuring GDP

The total spending by residents within a country, on either domestic or imported goods and services, is defined as:

$\text{Domestic expenditure} = C + I + G,$

where $C$ is consumption of domestic and imported goods and services by domestic residents, $I$ is the amount of investment and $G$ is government spending.

This implies that the total spending by residents within a country only on domestically produced goods and services is:

$\text{Domestic expenditure on domestic production} = C + I + G - M,$

where $M$ is the spending on imports. As goods can also be exported, for the total spending on domestically produced goods and services produced within a country, we need to add exports $(X)$ such that:

$\text{Total expenditure on domestic production} = C + I + G - M + X$

Since GDP is defined as the market value of domestic production, we have

$GDP = \text{Total expenditure on domestic production}$

Therefore,

$GDP = C + I + G - M + X$

Which often is re-arranged such that:

$GDP = C + I + G + (X - M),$

as $(X - M)$ represents net exports.