There are two ways to compute a nation's GDP. The expenditure approach is the most common. It requires you to sum up consumption (C), government spending (G), investments (I) and net exports (NX).
The other way is using the income approach. Here, you add a country's total national income (TNI), sales tax (ST), depreciation (D) and net foreign factor income (NFFI).