A GDP calculator adds up a country's gross domestic product using the expenditure approach: spending by households, businesses and government, plus exports minus imports. Enter consumption, investment, government spending, exports and imports, and the calculator gives GDP, net exports and the share of each part. Add the population to see GDP per capita, the average output per person.
The GDP formula
GDP = C + I + G + (X − M)
GDP per capita = GDP ÷ population
Wikipedia's Gross domestic product article explains the expenditure approach. C is household consumption of goods and services. I is investment by businesses and households in new capital, such as equipment and new homes; buying shares or bonds is saving, not investment. G is government spending on final goods and services, which leaves out transfer payments such as pensions. X is exports and M imports. Imports are subtracted because they are already included in consumption, investment and government spending but were produced abroad. The article describes GDP per capita as GDP divided by population.
How to use the GDP calculator
- Choose the units you are entering figures in, such as billions.
- Enter consumption, investment and government spending.
- Enter exports and imports.
- Optionally enter the population as a number of people.
- Press Calculate.
Worked example
An economy has consumption of $14,000 billion, investment of $4,000 billion, government spending of $3,500 billion, exports of $2,500 billion and imports of $3,000 billion. GDP is 14,000 + 4,000 + 3,500 + (2,500 − 3,000) = $21,000 billion. Net exports are −$500 billion, a trade deficit. Consumption makes up 66.7 percent of GDP. With a population of 330 million, GDP per capita is $21,000 billion ÷ 330 million, about $63,636 per person.
Why imports are subtracted
GDP measures what is produced inside the country. When a household buys an imported car, the purchase is counted in consumption, but the car was made elsewhere. Subtracting imports removes that foreign production, so only domestic output remains. Exports are added because they are made at home but bought by foreigners, so they don't appear in domestic consumption, investment or government spending. A country that imports more than it exports has negative net exports, which lowers GDP compared with total domestic spending.
Other ways to measure GDP
The article explains that GDP can also be measured by adding up incomes: compensation of employees, operating surplus of businesses, mixed income of the self-employed, and taxes less subsidies on production and imports. In principle the expenditure and income approaches give the same answer, because every dollar spent is someone's income. In practice statistics agencies reconcile small differences between them.
Nominal and real GDP
GDP calculated at current prices is nominal GDP. It can rise just because prices rise, so economists also measure real GDP at the prices of a base year. The article gives an example: if GDP was $100 million in 1990 and $300 million in 2000, but inflation halved the currency's value over that time, GDP in 2000 was only $150 million in 1990 money, real growth of 50 percent rather than the 200 percent the nominal figures suggest. A GDP deflator converts between the two.
GDP per capita
Dividing GDP by population gives a rough measure of average output per person, which makes countries of very different sizes easier to compare. The article calls it an idealised rough measure: it says nothing about how income is shared, and it doesn't include unpaid work or adjust for differences in prices between countries. The calculator needs to know the units of your GDP figures so it can divide correctly; for example, $21,000 billion is $21 trillion, which divided by 330 million people is about $63,636 each. For growth between two years, the percentage calculator works it out.
What each part tells you
The shares of GDP show how an economy is driven. In the example, household consumption is two thirds of GDP, so a change in consumer spending moves the total far more than the same percentage change in investment or government spending would. Comparing the shares over several years shows which kinds of spending are growing fastest. A large trade deficit means the country buys more from abroad than it sells, while a surplus means the reverse.
Using official figures
National statistics agencies publish GDP and its components every quarter and every year, usually in both nominal and real terms. To check the calculator, take the components from one table, enter them in the same units, and compare the total with the published GDP. Small differences can come from rounding or from items such as changes in business stocks, which agencies sometimes report separately from fixed investment. Using figures from the same release and the same period keeps the comparison fair.
Checking your inputs
Before you trust the total, check that every figure covers the same period and the same place, and that none of them has been counted twice. Government spending should not include the same purchases already counted in investment, and imports should be the full value of goods and services bought from abroad.
Common mistakes
- Adding imports. Subtract them.
- Including transfer payments in G. Pensions and benefits are not purchases of output.
- Counting purchases of shares as investment. Investment means new physical capital.
- Mixing units. Enter every part in the same units, and choose them in the units box.
What next
Use this often? Add GDP to your Home screen.
Frequently asked questions
How does a GDP calculator work?
It adds consumption, investment and government spending, then adds exports and subtracts imports.
What is GDP with C 14,000, I 4,000, G 3,500, X 2,500 and M 3,000?
21,000, with net exports of −500.
Why are imports subtracted from GDP?
They are already counted in spending but were produced abroad.
How is GDP per capita calculated?
GDP divided by population, which Wikipedia calls a rough measure.
What is the difference between nominal and real GDP?
Nominal GDP uses current prices; real GDP uses base-year prices.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.