Germany's calendar and seasonally adjusted trade surplus came in at 21.3 billion euros in July, up from 15.4 billion euros a month ago, according to data from the country's Federal Statistical Office published Tuesday.
Analysts expected a trade surplus of 16 billion euros for the month.
Exports edged down 0.8% month over month, compared with the 0.9% gain in June and the expected zero growth. Monthly imports were 5.7% lower, against the revised 4.5% increase earlier.