The rise of online shopping has defined an entire epoch of American retail, yet we know little about what boost, if any, it has given to consumers and to the economy as a whole.

Because of how federal data have been collected, it’s easier to answer questions about the price of butter or industrial spraying equipment than ones about what we buy over the Internet.

A team of economists from Stanford University and Visa hopes to fill in the gaps. The Stanford team negotiated with Visa for secure access to about 400 billion anonymous debit and credit transactions between 2007 and 2017, a stockpile that represents $21.2 trillion in economic activity. To put that in perspective, consider the entire economic output of the United States in 2017 was about $19.5 trillion.

Researchers compared online transactions with their bricks-and-mortar equivalents and found the typical household gained about $1,150 in terms of convenience and expanded choice by shopping online in 2017, when the Internet accounted for about 8 percent of all consumer spending. Their analysis was laid out in a recent working paper circulated by the National Bureau of Economic Research.

Stanford economist Peter Klenow said the team was surprised by the size of the online economy. “If it continues to grow like this, then it should be on our radar,” he said, because it could distort major indicators such as inflation and economic growth.

The rise of online shopping has also exacerbated income inequality, the researchers found. Higher-income households enjoy about three times the gains of lower-income ones, relative to their spending. Households with annual incomes above $50,000 do about 9.7 percent of their spending online. For lower-income households, the figure is around 3.4 percent.

MIT Sloan economist Catherine Tucker, who recently proposed a framework for evaluating the gains from digital commerce, in the Journal of Economic Literature, said the Stanford team’s measurements were a valuable complement to government statistics. Tucker has worked with Stanford’s Liran Einav, an author on the paper, but was not involved in this project.

The analysis

Einav said Visa’s data was “one of the few options” for measuring online activity across sectors and creating broad, economywide measures.

The economists estimated how much customers valued time and convenience by measuring how far someone was willing to drive before they would break down and shop at the same merchant online.

When the company offers online and offline options and the bricks-and-mortar option is a mile away, a customer will choose online about 12 percent of the time. When it’s 50 miles away? The customer will take the online option more than half of the time.

Yet, contrary to expectations, Americans in remote locations did not rely more on online shopping. Instead, the researchers found people in more densely populated areas were more likely to do their shopping online, though that may also be tied to education levels and access to Internet connections and banking services.

Measurement matters

There’s no formal definition of e-commerce. In this case, researchers chose to include online purchases of travel and hotels, but excluded recurring payments and bills.

The challenge of measuring the impact of timesaving search engines or mapping apps has been widely discussed. Less attention has been paid to what Klenow called the “unmeasured GDP growth” created by providing online access to goods.

“It’s a significant component of growth that’s occurring but isn’t emphasized in the standard measurement,” Klenow said.

In a separate 2018 working paper, Klenow used prices from Adobe Analytics to show online inflation lagging overall inflation by about 1.3 percentage points each year. If online commerce isn’t properly weighted, official measurements of price growth, and thus of real economic growth, could be off.

Poor measurement of the online economy isn’t merely an academic issue. It may make the economy appear smaller or faster-growing than it is. That misperception could lead policymakers to take unnecessary action, such as cooling an economy that isn’t overheating or stimulating one that’s already hot.