What happened

UnitedHealth Group (UNH 2.96%) beat analyst expectations for second-quarter results and raised its outlook for the full year. The healthcare and insurance company's stock got a healthy boost as a result, climbing more than 5% in Friday trading.

So what

Before markets opened, UnitedHealth reported second-quarter adjusted earnings of $5.57 per share on revenue of $80.33 billion, surpassing the consensus estimate for a $5.57 per share profit on sales of $79.68 billion. The company attributed the beat to lower pandemic-related costs and a slow recovery in non-urgent medical procedures, which combined to put a curb on medical expenses.

Health insurers have had to juggle their businesses during the pandemic, which has caused higher treatment expenses but has lowered spending on non-essential medical procedures. As pandemic-care costs have decreased, the insurance business has grown more profitable.

Now what

UnitedHealth expects the trend to continue into the second half of the year. The company raised its full-year 2022 earnings per-share guidance to $21.40 to $21.90 per share, from $21.20 to $21.70 per share. UnitedHealth also said it was eliminating copayments on common drugs, including insulin and anti-overdose treatments, responding to regulatory calls to reduce consumer costs in the wake of rising inflation.

Investors should note, however, that the trends fueling the higher earnings could turn on a dime. CFO John Rex on a post-earnings call with investors cautioned that there could be an impact from "rising COVID-related hospital admissions," though Rex said that so far these cases are leading to shorter stays in the hospital than UnitedHealth saw earlier in the pandemic.

The near term can be hard to forecast for an insurer, but UnitedHealth's quarter is a clear indication the company is moving in the right long-term direction.