U.S. e-commerce sales grew 16.3% during the second quarter, the Commerce Department reported today. Amazon was responsible for nearly half of that growth.

The e-commerce industry had an especially good quarter in Q2, as more than 12% of total retail spending occurred on the web, according to an Internet Retailer analysis of U.S. Commerce Department figures released this morning.

U.S. e-commerce sales reached $105.10 billion in the second quarter, a 16.3% jump compared with $90.40 billion in the second quarter of 2016. That’s the highest year-over-year increase in online retail sales since the first quarter of 2012, when e-commerce sales increased 16.8% over the prior-year quarter.

Total retail sales reached $1.27 trillion during the three months ended June 30, 2017, up 4.4% over the same time last year. By this definition of retail sales, e-commerce comprised 8.2% of the total. However, this underplays the impact of e-commerce since those retail sales figures include the sale of items not normally bought online, like gasoline and cars.

Factoring out gas and autos, retail sales reached $871.3 billion during the quarter, a 4.0% jump from $837.4 billion. Using those figures, the online portion of total retail spending in Q2 was 12.1%, up from 10.8% in the second quarter of 2016. Internet Retailer believes this is the most accurate way to measure e-commerce as it relates to the total retail market in the U.S.

Adjusted for seasonal variations, holiday and trading-day differences, the Commerce Department estimates Q2 web sales reached $111.54 billion, up 16.2% from $96.01 billion a year earlier. On an adjusted basis, e-commerce accounted for 12.9% of total Q2 retail sales excluding foodservice, automobiles and fuel, compared with 11.4% in the Q2 2016.


These figures make sense given the quarterly big e-commerce sales gains from several large online-only merchants and retail chains. Wal-Mart Stores Inc., for example, just today reported a 67% year-over-year increase in the total value of sales on its websites for its most recent fiscal quarter. Walmart is No. 3 in the Internet Retailer 2017 Top 500.

Target Corp. (No. 20)  has posted strong e-commerce growth several quarters in a row, but just this week posted a 32.4% year-over-year jump in online sales for its fiscal Q2.

Those reports came amid stagnant or declining store sales for many of the big chains. Macy’s Inc. (No. 6), for example, reported last week a 2.8% decline in comparable store sales, Kohl’s Corp. (No. 18) a 0.4% drop and J.C. Penney Stores Inc. (No. 33) a 1.3% decrease. Reports of the comparable store declines for Macy’s, Kohl’s and J.C. Penney are worsened by the fact that each company includes e-commerce sales in those figures, and e-commerce grew by double-digit percentages for all three.

Web leader Amazon.com Inc. (No. 1) also had a big quarter, as it reported North American net sales of $22.37 billion in the period ended June 30, up 26.6% from $17.67 billion. Including sales on its marketplace (and factoring out sales in Canada and Mexico), Internet Retailer estimates Amazon sold $39.93 billion worth of goods in the U.S. during the second quarter, a 22.2% increase compared with $32.66 billion in Q2 2016.


That means Amazon accounted for roughly 38.0% of Q2 e-commerce sales in the U.S. versus 36.1% in the year-ago quarter. It also was responsible for 49.4% of the total e-commerce growth.

Fareeha Ali contributed to this report.