Shares were unchanged in premarket trading, with the company forecasting adjusted 2018 earnings per share in the range of $8.13 and $8.18, marginally up from a previous range of $8.07 to $8.17.

Overall sales rose 3.6 percent to $20.35 billion in the quarter, higher than the average estimate of $20.05 billion.

"This is exactly how we want to start the third earnings season," BMO Capital Markets analyst Joanne Wuensch wrote in a note, referring to the overall sales number.

As Remicade faces increased competition and sales of medical devices and some consumer products weaken, J&J has been relying on its new cancer drugs as well as deals like the $30 billion purchase of rare disease specialist Actelion last year.

Sales of prostate cancer drug Zytiga surged ahead of analysts' estimates and raked in $958 million in the quarter, compared with the consensus estimate of $795 million, according to Barclays.

Sales of Stelara, which is used to treat psoriasis and other autoimmune diseases, jumped 16.5 percent to $1.31 billion, above the average estimate of $1.27 billion.

Remicade sales fell 16.3 percent to $1.38 billion, but narrowly beat the consensus estimate of $1.36 billion.

Blood cancer drug Darzalex brought in sales of $498 million, missing the analysts' average estimate of $510 million. Sales at the company's medical device business marginally fell to $6.59 billion and missed expectations of $6.66 billion.

Excluding items, the company earned $2.05 per share compared with the forecast of $2.03 per share, according to I/B/E/S data from Refinitiv.

J&J's Chief Financial Officer Joseph Wolk said in a CNBC interview after the results that the company applauds a U.S. government proposal requiring companies to include price of medicines in TV ads.

(This version corrects to "applauds" from "agrees" in last paragraph)

(Reporting by Manas Mishra in Bengaluru; Editing by Shailesh Kuber and Arun Koyyur)