The U.S. economy looked surprisingly soft on paper in the second quarter. Yet beneath the headline, it may have delivered one of the strongest signals yet that the artificial intelligence investment boom is accelerating.

Gross domestic product grew at an annualized 1.5%, slowing from 2.1% in the first quarter and missing economists' expectations for 2.1%.

At first glance, that looks like an economy losing momentum.

Look closer, however, and a different story emerges. One of the biggest drags on growth wasn't weaker consumers or cautious businesses.

It was America's unprecedented race to build AI infrastructure.

The Economy Didn't Slow Where It Matters

The cleanest measure of domestic demand tells a very different story.

Real final sales to private domestic purchasers - which strips out the volatile effects of inventories, trade and government spending - accelerated to 3.9% from 1.7% in the previous quarter.

That is one of the strongest readings in recent quarters.

Consumers spent more. Businesses invested more. Demand actually strengthened.

So why did headline GDP disappoint?

The answer sits in one line of the GDP report that most investors rarely read.

Two lines pulled the other way.

Government spending turned down and net exports decelerated, as imports rose more than they did in the first quarter.

The BEA said the rise in imports was led by capital goods excluding automotive - telecommunications equipment, semiconductors and related devices, and industrial equipment.

That is the shopping list required to build modern AI data centers.

Nearly every major hyperscaler - Microsoft Corporation (MSFT  ), Alphabet Inc. (GOOGL  ) (GOOG  ), Amazon.com Inc. (AMZN  ) and Meta Platforms Inc. (META  ) - is importing enormous quantities of hardware as they race to expand AI capacity.

GDP accounting treats imports as a subtraction from economic growth because they represent spending on foreign-produced goods.

Ironically, importing billions of dollars of AI hardware today is precisely what companies must do to generate future domestic output.

In other words, stronger AI investment temporarily made economic growth look weaker.

Pantheon Macroeconomics estimated that net exports alone shaved roughly one full percentage point off second-quarter GDP, while slower inventory accumulation reduced growth by another 0.7 percentage points.

Imports jumped 11.5% against an energy-led 4.5% rise in exports, and net trade knocked a full percentage point off growth.

Weaker inventory building took another 0.7 points.

"AI-related capex is bleeding out into spending on tech imports," Oliver Allen, senior U.S. economist at the firm, wrote.

Inflation Cooled, But Investors are Already Looking Ahead

The Federal Reserve's preferred inflation gauge also offered encouraging news.

Headline Personal Consumption Expenditures prices fell 0.1% in June from May, while core PCE increased just 0.1%, below expectations.

On an annual basis, headline inflation slowed to 3.7% and core inflation eased to 3.3%.

Much of that improvement came from lower energy prices, with gasoline spending posting the largest decline among consumer categories.

Whether that disinflation lasts is another question.

Oil prices have already rebounded sharply as geopolitical tensions in the Middle East intensified during July, suggesting some of June's relief may prove temporary.

Wall Street Saw Something Different in the GDP Report

Investors clearly focused on the investment story rather than the headline growth number.

The Nasdaq 100 surged 2.6%, while the Technology sector jumped 4.6%, dramatically outperforming every other sector.

The biggest gains among the mega-cap stocks came from companies at the heart of the AI infrastructure buildout, with several extending rallies after delivering blockbuster quarterly results.

  • Lam Research Corporation (LRCX  ) rallied nearly 21%.
  • Microsoft climbed almost 14%, on pace for its best day in six years.
  • Applied Materials Inc. (AMAT  ) gained more than 14%.
  • Micron Technology Inc. (MU  ) rose over 12%.
  • Advanced Micro Devices Inc. (AMD  ) advanced roughly 11%.
  • Intel Corporation (INTC  ) added about 10%.