A marked slowdown in food price increases moderated the rise in the cost of living in May, the Department of Labor reported yesterday.

Food costs, which climbed 1.5 per cent in April, rose by only 0.7 per cent last month. As a result, the consumer price index slowed its climb from 0.8 per cent to 0.6 per cent.

Still, the cost of living has been climbing at a hefty 8.4 per cent annual rate for the last three months. The consumer price index is 6.7 per cent higher than it was in May 1976. During all last year, consumer prices rose by only 4.8 per cent.

White House spokesman Jody Powell said he was pleased with the lower inflation pace in May, and he predicted "further improvement" in cost-of-living increases in the coming months.

While administration officials have held firm to their forecast that consumer prices would rise by between 6 and 6.5 per cent this year, recent sharp spurts in both wholesale and retail prices - triggered mainly by food and fuel price increases - have worried them.

When food and fuel prices are taken out of the cost of living index, it has risen by about 0.6 per cent in each of the last four months.

But administration economists and other analysts have feared that sustained large increases in food and fuel prices would boost wage demands. Big increases in wages and benefits would have the effect of raising all prices, not just those for food and fuel.

Office of Management and Budget Director Bert Lance said yesterday that the 0.6 per cent consumer price index rise is a "favorable trend," and he predicted a steady decline in inflation over the next two years.

He would not set any goals, however. "I hate to talk in numbers," he told a group of builders. "We normally hear the figure 6 per cent. But American citizens don't think much of that number because they see more than a 6 per cent increase at the grocery store."

Wholesale prices - a precursor of costs the consumer eventually faces - rose by only 0.4 per cent last month after several consecutive months of double-digit increases. As with consumer prices, the food and fuel components were the major culprits in the sharp acceleration of wholesale prices earlier this year.

The Labor Department said its consumer price index last month stood at 180.6 per cent of its 1967 average.

That means that a selection of goods and services which cost $10 in 1967 cost $18.08 last month. While the Labor Department adjusts all the percentage changes it reports to account for seasonal variations, it does not adjust the actual index itself.

The consumer price index is based on a selection of 400 different goods and services believed to represent the market basket of the average urban worker who heads a family of four.

The Labor Department is overhauling the consumer price index and expects to have a new one in several months.

The department said that the slowdown in grocery store food price increases - from 1.6 per cent in April to 0.7 per cent in May - "was primarily due to a sharp, 13.5 per cent decline in fresh vegetable prices. Prices also declined for fresh fruits, eggs and beef."

Many other food prices rose, however, including poultry, dairy products, pork, sugar and coffee.

Restaurant prices, which rose by 1.1 per cent in April, rose by 1 per cent in May.

The prices of nonfood* commodities such as clothing and cars rose by 0.4 per cent in May, the same as in March and April. Gasoline and fuel oil prices rose by 0.8 per cent.

The cost of services rose by 0.7 per cent compared with 0.8 per cent in March and April. Medical care prices and transportation costs increased by 0.9 per cent, about the same amount as in April and March, the Labor Department said.

The Labor Department said that real spendable earnings - after-tax earnings adjusted for inflation - increased by 0.1 per cent in May, but was down 0.4 per cent, over the year, mainly because of increases in taxes.

The Labor Department also reported that the consumer price index for the Washington area - which it computes every three months - was 7.2 per cent higher last month than in May 1976. Over the 12-month period, the national index rose by 6.7 per cent.