Skip to main content

Macro & growth

GDP Calculator

This calculator computes gross domestic product (GDP) from the expenditure identity: consumption (C) + investment (I) + government spending (G) + exports (X) minus imports (M). Or use a simplified income approach starting from gross national product (GNP) plus indirect taxes and depreciation minus net income of foreigners. Optional population in millions yields per capita when inputs are in billions; prior-period GDP shows growth; a deflator or inflation rate converts nominal to real GDP. Illustrative national-accounts math, not an official estimate.

By Jeff Beem

Updated

01

Methodology

02

Expenditure: C + I + G + (X − M)

Consumption (C) + investment (I) + government spending (G) + exports (X) − imports (M). Values in the same units (e.g. billions of US dollars).

$
$
$
$
$

Imports subtract domestic spending on foreign goods from the total.

03

Per capita (optional)

Leave blank to hide per capita (US ≈ 335M).

04

Growth vs. prior period (optional)

$

Same units as current GDP.

05

Real GDP (optional)

Real GDP (inflation-adjusted) = nominal GDP ÷ (deflator/100) or ÷ (1 + inflation/100).

Results

Gross domestic product

$22,300

Composition

Consumption (C)
67.3%
Investment (I)
15.7%
Government spending (G)
20.2%

GDP in context

Imports (M) subtract from expenditure gross domestic product (GDP) because consumption, investment, and government spending already include foreign goods. Without subtracting imports, you would count production that happened outside the border. Net exports (exports minus imports) can be negative when imports exceed exports.

The expenditure and income approaches should match in theory: every dollar spent on final output becomes wages, profit, rent, or interest. This tool uses simplified national-accounts line items; your expenditure and income totals may differ unless the inputs are reconciled.

Nominal GDP uses current prices; real GDP divides by a deflator index (100 = base year) or an inflation rate. GDP per capita divides total GDP by population in millions when inputs are in billions of dollars. GDP still misses unpaid work, inequality, environmental damage, and much informal activity.

How to use this calculator

Pick Expenditure or Income in 01, then enter components in 02 using the same units throughout (billions of US dollars by default). On expenditure, enter consumption (C), investment (I), government spending (G), exports (X), and imports (M). With the default expenditure lines (C $15,000, I $3,500, G $4,500, exports $2,500, imports $3,200), net exports are −$700 billion and nominal gross domestic product (GDP) totals $22,300 billion. Optional 03 population in millions for per capita, 04 prior-period GDP for growth rate, and 05 deflator index (100 = base year) or inflation % for real GDP. Results show total GDP, composition bars for positive components, and an expansion or contraction badge when growth is entered.

Reading your GDP results

The dark results card shows nominal gross domestic product (GDP) and, when you fill optional fields, real GDP, per capita, a growth badge, and composition bars for the active approach.

Example: expenditure defaults (billions of US dollars)

With Expenditure selected: consumption (C) $15,000, investment (I) $3,500, government spending (G) $4,500, exports (X) $2,500, imports (M) $3,200. Net exports are exports minus imports, or −$700. Nominal GDP = 15,000 + 3,500 + 4,500 − 700 = $22,300 billion. Composition bars show C ≈ 67.3%, I ≈ 15.7%, and G ≈ 20.2% of that total; net exports are negative, so that slice is not charted.

Income approach (separate scenario)

On Income, default factor payments sum to gross national product (GNP) $16,800 billion. The widget then adds indirect business taxes $1,400 and depreciation $3,200 and subtracts net income of foreigners $200 to reach GDP $21,200 billion. That total differs from the expenditure defaults until you align inputs between tabs.

Optional per capita, growth, and real GDP

Enter population 335 (millions) with expenditure GDP $22,300 billion → per capita ≈ $66,567. Prior GDP $24,000 → growth ≈ −7.1% with a Contraction badge. Deflator index 103 → real GDP ≈ $21,650 billion (nominal divided by 1.03).

Production approach not included

National accounts can also sum value added by industry (the production approach). This widget implements expenditure and income only; there is no production tab.

GDP calculator: expenditure and income approaches

This calculator computes gross domestic product (GDP) from spending components or from factor incomes plus adjustments. Optional population, prior-period GDP, and a deflator convert nominal totals to per capita, growth rate, and real GDP.

What this calculator does

Gross domestic product (GDP) measures the market value of goods and services produced inside a country during a period. This widget computes GDP two ways: the expenditure identity (what was purchased) and a simplified income approach (what was earned, adjusted to a domestic total). You can enter population in millions to get per capita when GDP is in billions, a prior GDP total for growth rate with an expansion or contraction badge, and a deflator or inflation rate to estimate real GDP. Composition bars show each positive component’s share of the active total. It does not forecast GDP, apply purchasing-power parity (PPP), or model the production (value-added) method.
  • Expenditure:
    GDP=C+I+G+(XM)GDP = C + I + G + (X - M)

    C = consumption, I = investment, G = government spending, X = exports, M = imports.

  • Income (this model):
    GNP=compensation+proprietor+profits+rent+interestGNP = \text{compensation} + \text{proprietor} + \text{profits} + \text{rent} + \text{interest}
    GDP=GNP+indirect taxes+depreciationnet income of foreignersGDP = GNP + \text{indirect taxes} + \text{depreciation} - \text{net income of foreigners}

    GNP = gross national product (income earned by residents before the domestic adjustment).

  • Real GDP:
    Real GDP=Nominal GDPDeflator/100\text{Real GDP} = \frac{\text{Nominal GDP}}{\text{Deflator}/100}

    Or nominal GDP ÷ (1 + inflation rate) when inflation % mode is selected in section 05.

How the math works

Start with the default expenditure inputs in section 02. Consumption is $15,000 billion, investment $3,500, government spending $4,500, exports $2,500, and imports $3,200 (all in billions of US dollars). The calculator first finds net exports: exports minus imports, which is −$700 billion. It then adds consumption, investment, government spending, and that net-export figure to get nominal GDP of $22,300 billion.
The composition chart expresses each positive line as a percent of that $22,300 total. Consumption is about 67.3%, investment about 15.7%, and government spending about 20.2%. Because net exports are negative, the chart hides that bar; the three visible shares can add to more than 100% even though the dollar total is correct.
Optional fields build on the same nominal total. Population 335 million converts GDP to about $66,567 per person. Prior GDP $24,000 billion yields growth of about −7.1% and a Contraction badge. A deflator index of 103 (prices 3% above the base year) divides nominal GDP by 1.03 to estimate real GDP near $21,650 billion. On the income tab, the same widget walks from factor payments to GNP, then adjusts to GDP; the default income lines produce $21,200 billion until you reconcile them with expenditure inputs.

Limits of the model

Expenditure and income should match in fully reconciled national accounts, but this tool treats your entries independently, so the two tabs can disagree until you align them. Real GDP here uses one deflator or inflation rate for the whole total, not component-level price indexes. GDP does not capture unpaid work, environmental damage, or how income is distributed. Official estimates come from statistical agencies such as the U.S. Bureau of Economic Analysis after revisions and discrepancy adjustments.

GDP Calculator FAQ

How does the expenditure approach work in this calculator?

On the Expenditure tab, you enter consumption (C), investment (I), government spending (G), exports (X), and imports (M) in the same units (billions of US dollars by default). The widget adds C + I + G, then adds exports and subtracts imports so foreign-made goods are not counted twice. At defaults, that sum is $22,300 billion.

Why are imports subtracted in the GDP formula?

Consumption, investment, and government spending already include some goods made abroad. Subtracting imports (M) leaves production that happened inside the country’s borders. If imports were not subtracted, foreign output would be counted as domestic gross domestic product (GDP).

How does the income approach differ from expenditure here?

Switch to Income in section 01. The widget first sums wages, profits, rent, and interest into gross national product (GNP), then adds indirect business taxes and depreciation and subtracts net income earned by foreigners to reach GDP. Default income inputs produce GDP of $21,200 billion, which differs from the expenditure defaults until you reconcile the line items.

How is real GDP calculated on this page?

Real GDP removes price changes from nominal GDP. In section 05, pick Deflator index and enter an index where 100 is the base year (example: 103 → real GDP ≈ $21,650 billion from nominal $22,300). Or pick Inflation % and the widget divides nominal GDP by (1 + inflation ÷ 100).

How does GDP per capita work when I enter population?

When GDP is in billions and population in millions, the widget converts to dollars per person: (GDP × 10⁹) ÷ (population × 10⁶). Example: $22,300 billion with 335 million people ≈ $66,567 per person.

What does the growth badge mean?

Enter prior-period GDP in section 04 using the same units as the current total. The results card shows year-over-year percent change and an Expansion or Contraction badge. Example: current $22,300 vs prior $24,000 → about −7.1% and a Contraction label.

Why do the composition bars not always add to 100%?

Each bar is that component’s share of total GDP. The chart only draws components with positive values, so when net exports are negative (defaults: exports $2,500 − imports $3,200 = −$700), the net-export bar is hidden and consumption, investment, and government shares can sum above 100%.

What does this calculator not measure?

It does not forecast GDP, apply purchasing-power parity (PPP), or use the production (value-added) method. Unpaid household work, inequality, pollution, and informal cash economies are outside gross domestic product (GDP) by design. Per capita is an average, not a median living standard.

Sources & citations

References used for the calculation method and definitions. Links open in a new tab when available.

[1]
BEA – What is GDP?

U.S. Bureau of Economic Analysis overview of gross domestic product, expenditure and income approaches, and real vs nominal measures.

[2]
BEA – Gross Domestic Product (GDP)

Official U.S. GDP data and methodology from the Bureau of Economic Analysis.

Financial Estimation Note

General Projections: Results are mathematical estimates based on the rates and formulas currently loaded for this tool, including year-specific tax data where noted. They are intended for high-level planning only.

No Advice Provided: This site does not provide financial, tax, or legal advice. Using this tool does not create a client-advisor relationship with CalcRegistry.

Confirm Numbers: Financial laws change frequently. Please verify all results with a qualified professional (CPA, Financial Planner, or Lawyer) before making significant financial decisions.

© 2026 CalcRegistry Reference Last Formula Sync: July 2026Free Online Utility Tools