GDP Calculator

Work out gross domestic product from spending or from income — then check that the two approaches agree.

Pick an approach, then fill in its components.
Figures are in
Personal Consumption
$
Gross Investment
$
Government Consumption
$
Exports
$
Imports
$
Every figure must use the unit picked above. The result comes back in that same unit.
Gross Domestic Product
$0.00

Component Breakdown
ComponentAmountShare of GDP
Both Approaches Compared
Expenditure approach GDP
Income approach GDP
Statistical discrepancy

What GDP Actually Measures

Gross domestic product is the market value of everything produced inside a country's borders over a set period, usually a quarter or a year. The two words doing the most work in that sentence are inside and produced. Location decides what counts, not ownership, so a foreign-owned factory operating domestically is part of GDP. And only new production counts, which is why buying a house built twenty years ago does nothing to GDP even though a large sum changed hands.

One more restriction matters: only final goods count. If the flour a bakery buys were counted alongside the bread it sells, the flour would be counted twice. Statistical agencies avoid that either by counting final sales only, or by adding up the value each business adds at its own stage. Both routes reach the same total, which is the first hint that GDP is less a single measurement than one number approached from several directions.

That is the idea this page is built around. Spending and income are two of those directions, and the calculator runs both so you can see them meet.

The Two Formulas This Calculator Uses

The expenditure approach asks what was spent on final output:

GDP = personal consumption + gross investment + government consumption + (exports − imports)

The income approach asks what was earned producing it, then corrects for the parts of a price that are nobody's income and for the difference between borders and residents:

GNP = employee compensation + proprietors' income + rental income + corporate profits + interest income

GDP = GNP + indirect business taxes + depreciation + net income of foreigners

Nothing more complicated than addition is involved, but the second formula rewards a moment of thought. Indirect business taxes and depreciation appear because the price a buyer pays includes sales tax that goes to the government and covers machinery wearing out — neither of which lands in anyone's income statement, yet both are part of what was produced. Net income of foreigners is the bridge from residents back to borders: it is what foreigners earn domestically minus what domestic citizens earn abroad, which is exactly the correction needed to turn GNP into GDP.

A practical note that costs people more marks than the formulas do: every figure must be in the same units. Mixing billions into a table of millions produces an answer that looks plausible and is wrong by a factor of a thousand.

Expenditure Approach: Each Input Explained

  • Personal consumption — household spending on goods and services: groceries, rent, fuel, haircuts, medical care. Normally the largest single component by a wide margin. Buying a newly built home is the notable exception; that is treated as investment, not consumption.
  • Gross investment — spending that expands productive capacity: new factories, machinery, equipment, new residential construction, and additions to inventory. Buying shares or bonds is not investment here, however natural that sounds — that is saving, and it only moves ownership of an existing asset.
  • Government consumption — what government buys in final goods and services, including public sector salaries and its own capital projects. Transfer payments such as pensions and unemployment benefits are deliberately excluded, because they hand money to households without anything being produced in return. That money reappears later as consumption when it is spent.
  • Exports — domestic production sold abroad. Produced here, so it counts here.
  • Imports — goods and services produced elsewhere. These are subtracted, and the reason is bookkeeping rather than trade policy: imported items are already sitting inside the consumption, investment and government figures above, so they have to be removed to leave only domestic production.

Income Approach: Each Input Explained

  • Employee compensation — wages and salaries plus employer contributions to social insurance and similar programs. Usually the largest income component.
  • Proprietors' income — earnings of unincorporated businesses such as sole traders and partnerships. It blends payment for labor, capital and risk-taking, which is precisely why it is kept apart from both wages and corporate profits.
  • Rental income — what property owners earn from letting property, excluding rent collected by corporate real estate companies, since that already sits inside corporate profits.
  • Corporate profits — company earnings whether distributed to shareholders or retained. Retained profit still counts; it was earned in the period regardless of where it was parked.
  • Interest income — returns to holders of deposits, debt securities and loans.
  • Indirect business taxes — sales taxes, business property taxes, licence fees. Part of the price paid, not part of anyone's income, so they are added back separately. Subsidies work in the opposite direction.
  • Depreciation — also called the capital consumption allowance: what has to be spent simply to keep the existing capital stock intact rather than to grow it.
  • Net income of foreigners — income foreigners earn domestically minus income domestic citizens earn abroad. This is the only field on the page that is frequently negative, and for many countries it genuinely is.

Why Both Approaches Land on the Same Number

The two formulas look unrelated and are not. Every dollar spent on final output arrives in somebody's pocket — as wages, as profit, as rent, as interest, as tax, or as the allowance covering worn-out equipment. Spending and income are the same flow observed at two points, which is why economists call this an identity rather than a theory. It holds by construction, not by evidence.

The default figures on this page are set up so you can watch it happen. The expenditure side gives $22,800; the income side gives GNP of $20,100, and once indirect business taxes, depreciation and net income of foreigners are applied it gives $22,800 as well. Fill in both tabs with your own figures and the comparison card underneath reports whether they reconcile and by how much.

Real published data does not match this cleanly, and no one pretends otherwise. The estimates come from different surveys with different coverage and timing, so agencies report the gap openly as the statistical discrepancy. When your own two answers disagree, though, the cause is almost always mundane: a component left out, a figure entered in the wrong units, or net income of foreigners entered with the wrong sign.

GDP vs. GNP vs. GNI

These three get used loosely and mean specific things. GDP is production inside the borders. GNP is production by the residents, wherever in the world it happens. GNI, gross national income, is the income accruing to residents and in practice tracks GNP closely enough that many statistical agencies have shifted to the GNI label.

The distinction stops being academic in economies with heavy foreign investment or large numbers of citizens working abroad. A country hosting many foreign-owned plants records that output in GDP while much of the resulting profit flows out, so GNP sits below GDP. A country whose workers send earnings home from abroad shows the opposite pattern. Where the two diverge sharply, quoting GDP alone can overstate how much of the output residents actually keep.

Nominal GDP, Real GDP and GDP Per Capita

The number this calculator returns is nominal GDP, because the components you enter are measured in the prices of their own period. That makes it unsuitable on its own for comparing across years: an economy where prices rose 5% and output did not move at all still posts higher nominal GDP.

Real GDP fixes this by restating output in the prices of a base year. The conversion is one division: real GDP equals nominal GDP divided by the GDP deflator, multiplied by 100. A deflator of 125 means prices are 25% above the base year, so $22,800 of nominal output is worth $18,240 in base-year prices. Growth rates quoted in the news are almost always real.

GDP per capita divides output by population, and the optional field on this page will do it alongside the main result. It is a per-person average and nothing more — it reveals nothing about distribution, which is why two countries with the same figure can feel very different to live in. For cross-country comparison, the purchasing-power-parity version is generally the better measure, since it adjusts for what a unit of currency actually buys locally rather than at the market exchange rate.

What GDP Leaves Out

GDP was built to measure market production and it does that well. Read as a report card on how a country is doing, it has well-known blind spots, and being straight about them is more useful than treating the number as a verdict.

  • Unpaid work is invisible. Housework, caregiving and volunteering create real value and register as nothing. A meal cooked at home does not count; the same meal bought in a restaurant does.
  • Distribution is invisible. Two economies with identical GDP can distribute the proceeds very differently, and the number cannot tell them apart.
  • Depletion and damage are not netted off. Cutting a forest adds to output; the loss of the forest is not subtracted. Cleaning up after a disaster adds to GDP as well.
  • Quality change is hard to capture. A phone at the same price as one from a decade ago is a far better product, and price-based measures struggle with that.
  • The informal economy is excluded by necessity rather than choice, which matters more in some countries than others.

None of this makes GDP the wrong tool. It makes it a measure of one specific thing — market output — that is best read next to employment, real income, inequality and other indicators rather than in place of them.

Frequently Asked Questions

What is the formula for GDP?

There is more than one, because GDP can be reached from different directions. Spending gives GDP = personal consumption + gross investment + government consumption + net exports, where net exports is simply exports minus imports. Income gives GNP = employee compensation + proprietors' income + rental income + corporate profits + interest income, and then GDP = GNP + indirect business taxes + depreciation + net income of foreigners. Both routes describe the same economy and should land on the same number.

How do you calculate GDP using the expenditure approach?

Add up everything spent on final goods and services and subtract what was spent on imports, since imports were produced elsewhere. Using the figures this page opens with, $14,800 of consumption plus $4,600 of investment plus $4,200 of government spending comes to $23,600, and exports of $2,500 minus imports of $3,300 subtracts a further $800, giving $22,800. Consumption is usually the dominant term, and net exports is the only one that can legitimately be negative.

How do you calculate GDP using the income approach?

Add up what everyone earned from producing, then adjust for the things income statements do not capture. The five income items on this page total $20,100, which is GNP. Adding indirect business taxes of $1,750 and depreciation of $3,000, then applying net income of foreigners of -$2,050, gives $22,800. The last three lines exist because sales taxes and capital wearing out are part of what buyers pay but not part of anyone's income, and because GDP counts production inside the borders while GNP counts production by residents.

What is the difference between GDP and GNP?

GDP counts what is produced inside a country's borders no matter who owns the factory; GNP counts what is produced by a country's residents no matter where in the world they do it. A foreign-owned plant operating domestically adds to GDP but not GNP, and a citizen working abroad adds to GNP but not GDP. On this page GNP appears as the subtotal partway down the income approach, before the adjustments that convert it into GDP.

Why do the two approaches sometimes not match?

In theory they cannot differ, because every dollar spent is a dollar someone earned. In practice they are estimated from separate surveys with separate response rates and timing, so the two totals rarely land exactly on top of each other. Statistical agencies publish the gap openly as the statistical discrepancy. If your own two answers differ, it usually means an input was missed or entered in the wrong units rather than that the identity has broken.

What is the difference between nominal and real GDP?

Nominal GDP values output at the prices actually charged in that period, so it rises when prices rise even if nothing more was produced. Real GDP restates output in the prices of a chosen base year, which strips inflation out and shows whether production genuinely grew. This calculator returns nominal GDP, since the components you enter are in current prices. To convert, divide by the GDP deflator for that period and multiply by 100.

How do you calculate GDP per capita?

Divide GDP by the population over the same period. If you enter a population in the optional field here, that division is done for you. The figure is an average, not a typical income, so it says nothing about how output is distributed. For comparisons across countries, GDP per capita at purchasing power parity is usually more informative than the nominal version, because it adjusts for how much a unit of currency actually buys locally.

What is not included in GDP?

Anything produced outside measurable market transactions. Unpaid housework and caregiving, volunteering, and do-it-yourself work are excluded even though they clearly create value, and so is the black market, because neither can be reliably observed. Purely financial transfers are also excluded: buying existing shares or an existing house moves money without producing anything new, though the broker's fee does count because that is a service produced now.

This calculator is an educational tool for working through the standard GDP formulas with your own figures. It performs the arithmetic on the values you enter and does not supply national accounts data, adjust for inflation, or validate whether your inputs follow any particular statistical agency's definitions. For official figures, consult the relevant national statistics office. Nothing here is financial, investment or policy advice.