The U.S. trade deficit widened to $50.08 billion in July from the revised deficit of $45.74 billion in June as exports fell and imports grew, according to data from the U.S. Department of Commerce's Bureau of Economic Analysis.
Econoday had forecast a deficit of $50.2 billion.
Exports declined to $211.08 billion in July from $213.20 billion in the prior month, while imports increased to $261.16 billion from $258.93 billion.
The latest data come as the U.S. considers whether to impose 25% tariffs on $200 billion of imports from China this week. A public comment period on the proposed levies ends Sept. 6.
The U.S. trade gap with China ticked up to $34.14 billion from $32.45 billion on a seasonally adjusted basis. The deficit with the EU rose to $14.52 billion from $12.82 billion, while that with Canada widened to $3.23 billion from the revised $2.59 billion.
Year-to-date, the goods and services deficit increased $22.0 billion, or 7.0%, from the same period in 2017.