Merck on Tuesday reported second-quarter earnings and revenue that easily beat Wall Street's expectations and narrowed its earnings and revenue forecast for the year.

Share prices were up 0.8% in late morning.

Here's how the company did compared with what Wall Street expected:

Earnings: $1.30 per share vs. $1.16 per share forecast by Refinitiv

Revenue: $11.76 billion vs. $10.96 billion forecast by Refinitiv

The company expects full-year earnings per share between $4.84 and $4.94 versus the $4.75 a share Wall Street expects. It sees 2019 revenue coming between $45.2 billion and $46.2 billion. Wall Street was expecting revenue of $44.74 billion this year. Merck said the reduction in the earnings range reflects the inclusion of a charge of about $1.1 billion related to the acquisition of biotech firm Peloton Therapeutics, announced in May.

"Our science-led strategy and execution across our key growth pillars have driven another quarter of accelerating revenue growth with strength across our global portfolio," Chairman and CEO Ken Frazier said in the earnings release.

Merck said sales of Keytruda immunotherapy surged 58% in the quarter to $2.6 billion. Keytruda, which boosts the immune system to attack cancer, has driven growth for Merck and put pressure on Bristol-Myers Squibb's rival drug Opdivo.

Sales of Merck's Gardasil vaccine to prevent certain types of cancer were up 45.7% to $886 million. Sales of vaccines to children, which includes the company's MMR vaccine for measles, jumped 58% to $675 million.

The financial results come as the entire pharmaceutical market struggles amid scrutiny from the White House and Congress to lower prescription drugs costs. The SPDR S&P Pharmaceuticals XPH, an ETF that tracks the pharma industry's biggest companies, has increased roughly 3% year to date as of Monday's close, significantly lagging the S&P 500's 20% rise over the same period.