What Is the Formula for GDP? C + I + G + (X−M)

The most widely used formula for GDP (gross domestic product) is the expenditure approach: GDP = C + I + G + (X − M). This formula adds up everything spent on final goods and services produced within a country during a specific period. But there are actually three ways to calculate GDP, and understanding what each variable means helps you make sense of the economic data you see in the news.

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

This is the textbook formula and the one the U.S. Bureau of Economic Analysis highlights as its primary method. Each letter represents a category of spending:

  • C (Consumer spending) is the value of goods and services sold to people. This includes everything from groceries and rent to haircuts and new cars. It’s the largest component, typically making up roughly two-thirds of U.S. GDP.
  • I (Business investment) is the value of spending by businesses on equipment, software, structures, and inventory. It also includes residential construction. This is not “investment” in the stock-market sense; it refers to purchases of physical and intellectual assets used to produce goods and services.
  • G (Government spending) is the value of goods and services purchased by federal, state, and local governments. Think military equipment, public school teachers’ salaries, and highway construction. Transfer payments like Social Security checks are not counted here because they don’t represent the government buying a good or service.
  • X (Exports) is the value of goods and services produced domestically and sold to buyers in other countries.
  • M (Imports) is the value of goods and services purchased from other countries. Imports are subtracted so that GDP measures only what was produced domestically. If you buy a foreign-made television, that purchase shows up in C, so subtracting M removes the portion that wasn’t produced within the country.

When X minus M is positive, the country runs a trade surplus, which adds to GDP. When it’s negative (a trade deficit), it subtracts from GDP.

The Income Approach

Instead of adding up what people spend, the income approach adds up what people earn. The logic is simple: every dollar spent on a product becomes income for someone, whether that’s a worker’s paycheck, a landlord’s rent, or a company’s profit. The formula looks like this:

GDP = Total National Income + Sales Taxes + Depreciation + Net Foreign Factor Income

Total national income is the sum of all wages, rent, interest, and profits earned in the economy. Sales taxes (and other indirect business taxes) are added because they’re part of the final price of goods but don’t show up as anyone’s income. Depreciation, sometimes called the capital consumption allowance, accounts for the wear and tear on equipment and buildings; it represents value created during production that doesn’t flow to anyone as income. Net foreign factor income adjusts for the difference between what a country’s citizens earn abroad and what foreign citizens earn domestically.

In theory, the income approach and the expenditure approach should produce the same number. In practice, they differ slightly because of measurement gaps, and statistical agencies publish a “statistical discrepancy” line to reconcile the two.

The Production (Value-Added) Approach

The production approach calculates GDP by estimating the total value of economic output and subtracting the cost of intermediate goods consumed in the process. An intermediate good is something used up in making another product. Flour sold to a bakery is an intermediate good; the bread sold to a customer is the final good. If you counted both the flour and the bread, you’d be double-counting.

This method essentially adds up the “value added” at each stage of production. A farmer grows wheat worth $1, a mill turns it into flour worth $2, and a bakery turns it into bread worth $5. The value added is $1 + $1 + $3 = $5, which equals the price of the final product. This approach is especially useful in countries where detailed sales data by industry is more available than consumer spending data.

Nominal GDP vs. Real GDP

All three formulas above give you nominal GDP, which measures output in current prices. The problem with nominal GDP is that it can rise simply because prices went up, not because the economy actually produced more stuff. Real GDP strips out inflation so you can see whether the economy genuinely grew.

To convert between the two, economists use the GDP price deflator:

GDP Price Deflator = (Nominal GDP ÷ Real GDP) × 100

If you know nominal GDP and the deflator, you can rearrange to find real GDP:

Real GDP = (Nominal GDP ÷ GDP Price Deflator) × 100

For example, if nominal GDP is $28 trillion and the GDP deflator is 120, real GDP would be about $23.3 trillion. The deflator of 120 tells you that prices are 20% higher than they were in the base year. Real GDP is the figure economists watch most closely when judging whether the economy is expanding or contracting.

What GDP Does Not Count

GDP measures the market value of goods and services a nation produces, which means several types of activity are left out. Unpaid work you do for yourself and your family, like cooking, cleaning, or childcare provided by a parent, is excluded because there’s no market transaction to track. Used goods are also excluded; when you buy a secondhand car, no new production occurred, so the sale doesn’t add to GDP. Transfer payments like Social Security, unemployment benefits, and welfare don’t count because they’re not payments for producing something. And illegal or underground market transactions are generally missed because they’re unreported.

These exclusions matter because GDP is often used as a shorthand for economic well-being, but it’s really just a measure of market production. A country could have a high GDP while its citizens do enormous amounts of unpaid labor or face poor quality of life in ways GDP doesn’t capture.

Putting the Formula to Use

When you see a headline saying “GDP grew 2.5% last quarter,” that figure almost always refers to the annualized change in real GDP calculated primarily through the expenditure approach. The Bureau of Economic Analysis releases three estimates for each quarter: an advance estimate about a month after the quarter ends, a second estimate the following month, and a third estimate the month after that, each incorporating more complete data.

Knowing what sits behind the formula helps you interpret these reports. If GDP growth slowed, you can look at whether consumer spending (C) pulled back, business investment (I) dropped, government purchases (G) changed, or the trade deficit (X − M) widened. Each component tells a different story about what’s happening in the economy, and the formula gives you a framework for reading it.