Agilent Technologies Inc.’s A, -1.25% profit increased in its second quarter as sales rose more than costs.

The Santa Clara, Calif.-based maker of laboratory instruments reported net income of $274 million, up from $216 million in the same period a year earlier. Earnings per share reached 91 cents from 70 cents, and adjusted earnings per share rose to $1.13 from 97 cents a year earlier.

The company had revenue of $1.61 billion in the three months through April 30, compared with $1.53 billion a year earlier, while total costs and expenses increased to $1.25 billion from $1.24 billion.

The sales and profit figures undershot market expectations. The median forecast by analysts surveyed by FactSet was for net revenue of $1.62 billion and net income of $337 million. In its first-quarter earnings report, the company forecast second-quarter revenue in a range from $1.60 billion to $1.63 billion, and adjusted earnings per share in a range from $1.10 to $1.12.

For the third quarter, Agilent said it expects revenue in a range from $1.63 billion to $1.65 billion, and adjusted earnings per share in a range from $1.20 to $1.22. The company raised its full-year outlook for adjusted earnings per share to a range from $4.86 to $4.93 from its previous guidance for a range from $4.80 to $4.90, and left its 2022 revenue outlook unchanged at a range from $6.67 billion to $6.73 billion.