Skip to content
Omnikalc

How do you calculate a country's GDP?

Enter consumption, investment, government spending, exports, imports, population and last year's GDP: get GDP, net exports, GDP per capita, growth and the share of each component.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

GDP (billion $)

27,900

Net exports are negative: a trade deficit subtracts from GDP
Net exports (billion $)
-900
GDP per capita
$83,284
GDP growth over the previous year
3.53%
Consumption share of GDP
67.7%
Investment share of GDP
18.3%
Government share of GDP
17.2%

Gross domestic product (GDP) is the headline number for the size of an economy. It can be added up in three ways: from what is produced, from what is earned or from what is spent. The spending approach is the most familiar: household consumption, business investment, government spending and net exports. This calculator adds them up and gives GDP per capita, growth and the share of each component.

How the calculation works

  • GDP = C + I + G + (X − M)
  • Net exports = exports − imports
  • GDP per capita = GDP ÷ population
  • Growth = (GDP ÷ previous GDP − 1) × 100
  • Share of a component = component ÷ GDP

Example

Consumption is $18,900 billion, investment $5,100 billion, government spending $4,800 billion, exports $3,000 billion and imports $3,900 billion. Net exports are −$900 billion. GDP is 18,900 + 5,100 + 4,800 − 900 = $27,900 billion. With a population of 335 million, GDP per capita is about $83,284. Compared with $26,950 billion the year before, growth is 3.52%. Consumption makes up 67.7% of GDP.

Why it matters

GDP growth is the main gauge of whether an economy is expanding or in recession, and it guides decisions of central banks, governments and investors. The split between consumption, investment and trade shows what drives growth: a consumption-led economy behaves differently from an export-led one.

Good to know

Nominal GDP includes inflation. To compare years, use real GDP, adjusted with a price index; the GDP deflator calculator does that. GDP leaves out unpaid work, such as housework, and the informal economy, and it counts spending on repairing damage as output. It is not a measure of well-being. This tool is for education. Compare the result with figures from official sources before drawing conclusions, and treat small differences as noise rather than as signals. Real economies move for many reasons at once, so no single indicator tells the whole story.

The GDP deflator calculator converts nominal GDP to real GDP, the spending multiplier calculator shows how a change in spending ripples through GDP, and the inflation calculator tracks price changes.

Frequently asked questions

What is GDP?

Gross domestic product is the total market value of all final goods and services produced in a country in a given period, usually a year or a quarter. It is the most common measure of the size of an economy.

What is the expenditure approach?

GDP = C + I + G + (X − M). It adds household consumption, business investment, government spending and net exports (exports minus imports). The same GDP can also be computed from income or from production.

Why are imports subtracted?

Consumption, investment and government spending include purchases of foreign goods. Subtracting imports removes them, so that GDP counts only what was produced domestically.

Is GDP per capita a measure of well-being?

It is a measure of average output per person, not of income distribution, leisure, health or the environment. It is a useful starting point for comparing countries, with other indicators.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.