WASHINGTON – After weeks of pain at the gas pump and the grocery store, the worst appears to be over.

Oil prices have fallen, with gas soon to follow. Demand for farm commodities, like the corn used in everything from cereal to soda, has dropped. And businesses remain slow to pass along higher costs because customers aren’t getting raises and might walk away.

Inflation isn’t much of a worry for economists these days.

“I think the bulk of the big price increases are over,” said Gus Faucher, an economist at Moody’s Analytics.

Lower prices — or at least a break in their steady rise — will come as a big relief. Consumer prices rose 3.2 percent for the year ending in April, the most since October 2008. Higher food and gas prices drove the gains.

Excluding those two categories, prices rose 0.2 percent in April. They rose 1.3 percent during the past year, below what the Federal Reserve considers healthy. Economists study this figure, known as core inflation, because food and energy prices are volatile.

Some inflation can be healthy for the economy because it encourages people to spend money and invest rather than sitting on their cash. More spending drives corporate growth, which makes businesses more likely to hire people.

Inflation was a bigger concern in March. Oil prices were rising steadily because of the unrest in the Middle East. Some feared gas could reach $5 a gallon, leaving Americans with much less money to spend on cars, appliances and vacations. That kind of drop in spending would squeeze corporate profits and delay hiring.

But last week, oil prices sank by the largest amount in two and half years. Americans drive less when gas prices get high enough, and concerns about slowing energy demand sent oil prices tumbling — from $114 at the start of May to about $97 on Friday.

Now the nationwide average price for gas has leveled off. On Friday it was just under $4 a gallon, where it’s been for the past week. Many analysts say it could drop to $3.50 as soon as next month.

The prices of milk, bread and chicken won’t fall as fast, but they could decline by the end of the year. That’s because prices of corn and other grains have fallen. Overseas ranchers are using less corn for feed, and U.S. farmers have planted more.

Food prices had risen in March at the fastest rate in three years.

Changes in grain and corn prices take longer to filter down to grocery stores than changes in oil prices do to the gas pump. That’s because grains and other commodities represent a smaller fraction of food costs in the United States than in other countries.

There was evidence in Friday’s government report on consumer prices that food inflation will slow by year’s end. Gas prices rose 3.3 percent in April, a steep rise but the smallest since November. Food costs rose 0.4 percent, half as fast as in March.