Analog Devices (ADI - Get Report) on Wednesday reported fiscal third-quarter sales and earnings that beat analysts' forecasts amid growth in chip demand related to 5G and electric vehicles.

The Norwood, Mass., chipmaker said it continued to struggle with a "challenging macroeconomic environment."

For the quarter ended Aug. 3, profit was $362.4 million, or 97 cents a share, down 11% from $408.6 million, or $1.08 a share, in the year-earlier period.

A survey of analysts by FactSet was looking for GAAP earnings of 85 cents a share.

On an adjusted basis, the company earned $1.26 a share, 4 cents above the FactSet-derived analyst estimate of $1.22. 

Revenue slipped 5% to $1.48 billion, ahead of analysts' forecast of $1.45 billion.

"Revenue and operating margins came in above the midpoint of guidance as ongoing broad-based weakness compared to the year-ago quarter was balanced by growth in new areas such as 5G and electric vehicles," Chief Executive Vincent Roche said in a statement. 

"While these uncertain times do not seem to be abating in the near term, ADI has successfully navigated macroeconomic challenges many times before," added Roche.

For the fiscal fourth quarter, Analog Devices expects per-share earnings of 86 cents, or an adjusted $1.22, both with a margin of plus or minus 7 cents. Sales are expected at $1.45 billion, plus or minus $50 million.

The FactSet survey is looking for GAAP earnings of 91 cents, or an adjusted $1.29. Revenue is forecast at $1.49 billion.

Shares of Analog Devices were trading down 1.23% at $108.93.

Save 57% With Our Labor Day Sale. Join Jim Cramer's Action Alerts PLUS investment club to become a smarter investor! Click here to sign up!