If you see prices creeping higher for everything from cereal to socks in the next few months, you can probably blame this stark reality: There aren’t enough truck drivers delivering the goods to stores.

A severe shortage of truckers is pushing up freight costs and, in turn, nudging up retail prices. And it’s occasionally leading to late deliveries that leave store shelves empty.

Self-driving trucks eventually may provide some relief, but driver shortfalls are expected to only get worse over the next few years.

The crunch also is affecting corporate profits, and the stock market, as higher transportation costs ding company earnings now being reported. It occasionally has forced manufacturers to shut down production if they don’t receive raw materials in time.

RELATED: Higher trucking costs eat into General Mills' profit

RELATED: Truck driver shortage slows operations at world’s largest newsprint maker

The driver shortage has been going on for years, with baby boomers retiring and few millennials willing to endure hardships such as being away from home for weeks at a time on cross-country deliveries. But it has taken a bigger toll the past year as the economy has strengthened, increasing demand for items ranging from oil and housing supplies to clothing and consumer electronics.

Fast-growing e-commerce shipments, particularly from Amazon.com, add to the congestion. And it’s likely to intensify in coming months as the holiday season draws closer, analysts say, with deliveries arriving as early as late spring.

“We’ve probably never had a situation like we have today, where the demand is strong and capacity is constrained,” American Trucking Associations Chief Economist Bob Costello said.

RELATED: Analysis - The US is running out of truckers

Compounding the squeeze: On April 1, industry safety officials began enforcing a requirement for all trucks to be equipped with electronic devices to ensure drivers comply with limits on how long they can drive without a break. That’s reducing the number of trucks available at any given time and causing some drivers to leave the business, crimping capacity over the longer term, says Ben Cubitt, senior vice president of Transplace, a freight management firm that helps companies cut costs and improve service.

There’s a shortage of 51,000 truck drivers nationwide, according to ATA, up from 20,000 in 2013 and 36,500 in 2016. The trucking trade federation projects the driver gap will increase to nearly 100,000 by 2021. Meanwhile, the economy grew at more than a 3% annual pace during the last nine months of 2017, up from an average 2.2% since the Great Recession ended in 2009.

The shipping constraints were acute early this year as harsh weather exacerbated the backup in deliveries caused by the driver shortage, Cubitt said. They eased somewhat in March as the Chinese New Year reduced shipments to U.S. ports, said Jason Parker, senior trucking manager for Flexport, a freight brokerage company. But the backups are mounting again as spring home building picks up and the stricter driving limits take hold.

RELATED: Southern Indiana trucking companies battling ‘catastrophic’ driver shortage

Ninety-nine percent of trucks nationwide are in use, Cubitt said, up from 92% in October 2015. “Every truck is spoken for every day,” he said.

The biggest impact is on freight costs. Trucking companies have increased rates 6% to 10% in the contracts they’ve signed with shippers over the past year to offset higher wages and take advantage of the strong demand and limited supplies, Cubitt said. Parker said rates have leaped at least 10%, and he expects a similar rise over the next year.

In response to higher shipping costs, retailers raised shelf prices modestly early this year but pulled back after Walmart didn’t follow suit, Wolfe Research analyst Scott Mushkin said. Walmart and Amazon, he said, have created a hypercompetitive environment that is making it tough to boost retail prices. Yet he expects more retailers to pass higher freight costs to shoppers later this year.

The increases are likely to be small, perhaps a few cents for a typical weekly grocery bill, said Joe Glauber, chief economist at the International Food Policy Research Institute. Shipping costs make up 3.6% of consumer food prices and 6% of overall retail prices, Glauber and Cubitt said. But retail prices are expected to increase as the driver shortage intensifies.

Several grocery store chains, including Kroger, Publix and Supervalu, did not return messages asking whether they planned to raise retail prices in response to the higher shipping costs.

The rising transportation expenses are combining with higher labor, commodity and energy prices to narrow margins on corporate profits.

RELATED: Fleets seek drivers as turnover rate hits 95%

Along with higher contract rates, spot rates — which cover immediate deliveries and change constantly — have soared 30% to 80% over the past year, Cubitt said. Manufacturers, he said, increasingly have had to turn to the more expensive spot market as the driver shortage worsens.

General Mills, maker of Cheerios and Yoplait yogurt, is forced to tap that pricier spot market for 20% of its shipments, versus its normal 5%, “and the spot market prices can be 30% to 60% higher than our contracted rates,” CEO Jeff Harmening told analysts last month. He largely blamed the higher freight costs for a third-quarter operating profit “that fell well short of our expectations.”

So far, most producers have absorbed the added costs, but that’s changing as they realize the price increases aren’t temporary, Cubitt said.

General Mills has told convenience stores and food services they will have to start paying more by May to offset some of those higher expenses.

In early February, Tom Hayes, CEO of chicken and snack maker Tyson Foods, told analysts the trucker shortage will add more than $200 million in costs in its current fiscal year, and it intends to pass them on to food retailers.

Some shipments arrive late as manufacturers scramble for trucks. Goods are languishing at shipping ports an average four days, up from a typical two days, Parker said. The share delivered on time has slipped from a range of 92-96% to 85-89%, Transplace said. In about 5% of cases, store shelves sit empty because of late deliveries, Parker estimates.

To attract drivers, trucking companies are offering sign-on bonuses, ATA’s Costello said. And wages have jumped at least 10% over the past 18 months, he added. Yet higher pay typically isn’t enough to overcome many people’s aversion to a rough-and-tumble driver lifestyle.

ATA backs legislation in Congress to lower the minimum age for interstate driving from 21 to 18. Trucking loses many potential recruits to other industries when they graduate from high school, Costello said.

C.R. England, the largest refrigerated carrier, employs 6,700 drivers but would like to hire an additional 500 to meet demand, said Wayne Cederholm, vice president of recruiting.

“Every single day is a battle” to find drivers, he said.