GDP Calculator

Calculate GDP with the expenditure formula C + I + G + (X − M), convert nominal to real GDP, and work out GDP growth and GDP per capita.

GDP calculator
Calculate

Enter all money values in the same unit, such as billions of dollars.

Result

    These are the standard textbook formulas used in national accounts. Official GDP figures are compiled by national statistics agencies from many more data sources.

    On this page

    The GDP calculator works out gross domestic product using the expenditure formula, GDP = C + I + G + (X − M), and also converts nominal GDP to real GDP, measures GDP growth and calculates GDP per capita. With consumption of 14,000, investment of 3,800, government spending of 3,900, exports of 2,500 and imports of 3,200 (all in billions), GDP is 21,000 billion, and net exports are −700, a trade deficit.

    It’s designed for economics students, teachers and anyone who wants to understand the headline figures in the news. Every result shows the formula with your numbers, so you can follow the working step by step.

    How to use the GDP calculator

    1. Choose what to calculate: GDP from its components, real GDP, the growth rate or GDP per capita.
    2. Enter the figures in one consistent unit, such as billions of dollars. Commas are fine.
    3. Select Calculate. You’ll see the result, the formula with your numbers and a breakdown, such as each component’s share of GDP.

    What GDP measures

    Gross domestic product is the total market value of all final goods and services produced within a country in a given period, usually a quarter or a year. It’s the most widely used measure of the size of an economy and of how fast it’s growing. “Final” means goods sold to their end users; intermediate goods, such as the flour a baker buys, are left out so they aren’t counted twice.

    GDP can be measured in three ways that should, in principle, give the same answer: by adding up spending (the expenditure approach), incomes (the income approach) or the value added at each stage of production (the production approach). This calculator uses the expenditure approach, the one taught most often in economics courses.

    The expenditure formula: C + I + G + (X − M)

    • C, consumption: household spending on goods and services, from food and rent to haircuts and cars. It’s usually the largest component, often 50 to 70% of GDP.
    • I, investment: business spending on equipment, software and buildings, new housing, and changes in inventories. It doesn’t include buying shares or bonds, which are financial transactions.
    • G, government spending: government purchases of goods and services, such as salaries of public employees, roads and defence. Transfer payments like pensions and unemployment benefits aren’t included, because they don’t pay for new production.
    • X − M, net exports: exports minus imports. Exports add to GDP because they are produced at home; imports are subtracted because they’re already counted in C, I or G but were produced abroad.

    Worked example

    Using the default example: 14,000 + 3,800 + 3,900 + (2,500 − 3,200) = 21,700 − 700 = 21,000. Consumption makes up 66.7% of GDP, investment 18.1% and government spending 18.6%. Net exports are −3.3% of GDP, showing the country imports more than it exports.

    Nominal and real GDP

    Nominal GDP measures output at current prices, so it rises when prices rise even if the economy produces nothing extra. Real GDP removes the effect of inflation by valuing output at the prices of a base year. That’s why real GDP is used to measure economic growth.

    Real GDP = nominal GDP ÷ GDP deflator × 100

    The GDP deflator is a price index for everything included in GDP, set to 100 in the base year. If nominal GDP is 25,000 and the deflator is 125, real GDP is 25,000 ÷ 125 × 100 = 20,000. Prices have risen 25% since the base year, and 5,000 of the nominal figure, 20%, reflects higher prices rather than more output.

    GDP growth rate

    Growth rate = (GDP this period ÷ GDP last period − 1) × 100

    If real GDP rises from 20,000 to 21,000 in a year, the growth rate is (21,000 ÷ 20,000 − 1) × 100 = 5%. For longer periods, the calculator also gives the compound annual growth rate (CAGR), the steady yearly rate that gets from the first figure to the last. Growth from 20,000 to 23,152.5 over 3 years is 15.76% in total, but a CAGR of exactly 5% a year.

    The calculator also shows how long GDP would take to double at that rate. At 5% a year, it doubles in about 14.2 years. A quick approximation is the rule of 70: divide 70 by the growth rate, so 70 ÷ 5 = 14 years.

    Use real GDP figures to measure growth. Growth calculated from nominal GDP mixes real growth with inflation.

    GDP per capita

    GDP per capita = GDP ÷ population

    GDP per capita shows average output per person and is often used to compare living standards between countries or over time. A GDP of 21 trillion and a population of 335 million give GDP per capita of about 62,687 per person. Comparisons between countries are often made using purchasing power parity (PPP), which adjusts for differences in what money buys in each country.

    The income and production approaches

    The income approach adds up all the income earned from production: wages and salaries, profits, rent and interest, plus taxes on production and imports minus subsidies, and an allowance for depreciation. The production approach, also called the value-added approach, adds the value each business adds to its inputs. A baker who buys flour for $1 and sells bread for $3 adds $2 of value; adding up value added across the economy avoids counting the flour twice. In practice, statistics agencies use all three methods, and small differences between them are reported as a statistical discrepancy.

    Reading GDP figures in the news

    GDP is usually published quarterly, and the way growth is reported differs between countries. The United States reports quarterly growth as an annualised rate, the growth the economy would achieve if that quarter’s pace continued for a full year, so 0.5% growth in a quarter is reported as about 2% annualised. The UK and many other countries report the plain quarter-on-quarter change. Many commentators describe two consecutive quarters of falling real GDP as a recession, although in the United States the official dating of recessions is done by the National Bureau of Economic Research using a broader set of indicators. First estimates are often revised as more data arrives, so headline numbers can change months later.

    What GDP doesn’t measure

    GDP is a measure of market production, not of well-being. It leaves out unpaid work such as caring for family members and volunteering, most of the informal economy, and the depletion of natural resources. It doesn’t show how income is distributed, so average GDP per capita can rise while many people’s incomes stay flat. And it counts spending to repair damage, such as after a natural disaster, as positive output. That’s why economists look at GDP alongside other indicators, such as median household income, employment, inequality measures, life expectancy and the Human Development Index.

    Common mistakes

    • Mixing units: enter every component in the same unit, such as billions of dollars.
    • Counting transfers as G: pensions and benefits are not government purchases of output.
    • Counting financial investment as I: buying shares or bonds isn’t investment in the GDP sense.
    • Adding imports: imports are subtracted, not added. A large import bill doesn’t increase GDP.
    • Using nominal GDP for growth: compare real GDP figures so inflation doesn’t inflate the result.

    Related calculations

    Two other tools work well alongside this one: the inflation calculator, to see how inflation changes the value of money over time, and the percent calculator, to work out percentages and percentage change.

    Frequently asked questions

    Using the expenditure approach, GDP = C + I + G + (X − M): consumption plus investment plus government spending plus exports minus imports.

    Divide nominal GDP by the GDP deflator and multiply by 100. Nominal GDP of 25,000 with a deflator of 125 gives real GDP of 20,000.

    Divide this year's real GDP by last year's, subtract 1 and multiply by 100. Growth from 20,000 to 21,000 is 5%.

    GDP divided by the population. It shows average economic output per person.

    Imports are already included in consumption, investment and government spending but were produced abroad, so they're subtracted to count only domestic production.

    Nominal GDP uses current prices; real GDP uses constant base-year prices, removing the effect of inflation.

    A price index covering everything in GDP, set to 100 in the base year. A deflator of 125 means prices are 25% higher than in the base year.

    No. They are transfer payments, not purchases of goods and services, so they're excluded from G.

    In most economies, household consumption, often around 50 to 70% of GDP.

    Only partly. It measures market output but leaves out unpaid work, inequality and environmental costs, so it's best read alongside other indicators.

    It is the growth rate the economy would reach in a year if a single quarter's pace continued. Quarterly growth of 0.5% is about 2% annualised.

    A significant, widespread fall in economic activity. Two consecutive quarters of falling real GDP is a common rule of thumb, but official definitions vary by country.

    Divide 70 by the annual growth rate. At 5% growth, GDP doubles in about 14 years.