By Nina Adam

The Ifo measure of German business confidence weakened for the first time in seven months in May, albeit only slightly, as companies scaled back their business expectations, another sign that growth in Europe's largest economy is losing momentum.

The Ifo business climate index slipped to 108.5 from 108.6 in April, its first drop since October 2014. Economists surveyed by The Wall Street Journal had expected the indicator to slip to 108.4.

"The German economy remains on track," although manufactures reduced their export expectations in May, Ifo President Hans-Werner Sinn said.

The Ifo index continues to points to solid growth this year, but adds to evidence that the upswing is running out of steam. Germany's private sector activity hit a five-month low in May as input prices rose at their fastest rate in almost three years, a survey of purchasing managers showed on Thursday. The ZEW indicator of economic expectations also hit its lowest level since December 2014 in May.

Every month, the Ifo think tank asks about 7,000 companies in manufacturing, construction, wholesaling and retailing about their business expectations for the next six months and their assessment of the current situation.

Write to Nina Adam at nina.adam@wsj.com