FILE PHOTO: An automobile dealership uses racks to store its inventory of vehicles in Los Angeles, California, U.S. January 29, 2024. REUTERS/Mike Blake/File Photo

WASHINGTON(Reuters) -U.S. business inventories increased marginally in July amid a surge in sales, government data showed.

Inventories rose 0.2% after advancing by the same margin in June, the Commerce Department's Census Bureau said on Tuesday. Inventories are a key component of gross domestic product and one of the most volatile. They increased 1.5% year-on-year.

Inventories decreased at a $32.9 billion annualized rate in the second quarter, subtracting 3.29 percentage points from GDP. That was, however, more than offset by a record 4.95 percentage point contribution from a smaller trade deficit.

The economy grew at a 3.3% annualized rate last quarter after contracting at a 0.5% pace in the first quarter. The Atlanta Federal Reserve is currently estimating GDP growing at a 3.1% rate in the third quarter.

Retail inventories increased 0.2% in July as estimated in an advance report published last month. They gained 0.2% in June.

Motor vehicle inventories rose 0.5%, rather than 0.3% as previously reported. They advanced 0.9% in June. Retail inventories excluding autos, which go into the calculation of GDP, edged up 0.1% as initially reported.

Wholesale inventories rose 0.1% in July, while stocks at manufacturers increased 0.3%.

Business sales shot up 1.0% in July after rising 0.7% in June. At July's sales pace, it would take 1.37 months for businesses to clear shelves, down from 1.38 months in June.

(Reporting by Lucia Mutikani; Editing by Andrea Ricci)