The company said non-GAAP earnings rose 4% from the year-earlier period to $4.38 a share, helped by fewer weighted shares outstanding. Revenue for the period rose 5% to $6.5 billion.
The company had been expected to report earnings of $4.09 a share, on sales of $6.5 billion, based on a FactSet survey of 22 analysts.
In the same period a year ago, the company posted earnings of $4.25 a share on sales of $6.2 billion.
"We achieved solid, volume-driven growth in the quarter as our business recovered from the effects of the pandemic," said Robert A. Bradway, chairman and chief executive officer, in a statement.
"As we look to the balance of the year, we are excited to be launching Lumakras, a first-in-class lung cancer treatment, and advancing a robust pipeline of potential new medicines to meet the demands of patients around the world," Bradway added.
In late May, Amgen won FDA approval for Lumakras, a drug that treats a non-small cell lung cancer with a specific mutation gene known as KRAS.
The company maintained its previous guidance for full-year revenue of $25.8 billion to $26.6 billion and non-GAAP earnings per share of $16 to $17 a share. It said it expects share repurchases for the year to come in "at the upper end" of previous guidance of $3 billion to $5 billion.
For the year, analysts project revenue of $26 billion.
In the upcoming quarter analysts are forecasting net income of $2.5 billion, or $4.30 a share, on sales of $6.7 billion.
Shares of Amgen fell $1.08 or 0.4%, to $243 in after-hours trading Tuesday. The stock has fallen about 4% since the company last reported earnings on April 27.
During the second quarter, Amgen completed its acquisition of cancer-drug specialist Five Prime for $1.9 billion. The deal was first announced in early March.
The company's board recently declared a $1.76 a share dividend for the third quarter, payable Sept. 8 to stockholders of record as of the close on Aug. 17.