UnitedHealth, the largest U.S. health insurer, on Tuesday reported better-than-expected third-quarter earnings and revenue, driven by higher membership growth for its health insurance plans.

UnitedHealth earnings rose 28 percent to $3.41 per share. Total revenue rose 12.4 percent to $56.56 billion. Analysts on average had expected earnings of $3.29 per share on revenue of $56.34 billion, according to data from Refinitiv.

The company said its insurance business added 2.8 million more consumers year-over-year in the quarter.

UnitedHealth expects full-year adjusted earnings per share to approach $12.80, compared with its prior forecast of between $12.50 and $12.75.

The Hopkins, Minnesota-based company's medical loss ratio, or the percentage of premiums paid out for medical services, was 81 percent in the quarter. The ratio was 8.14 percent a year ago.

Ana Gupte, senior research analyst at Leerink Partners, said in a note to clients Tuesday that UnitedHealth's Optum unit is "growing solidly" in all segments, with growth of nearly 11 percent.

In an interview with CNBC's "Squawk Box," Gupte said UnitedHealth is the "bellwether" among the health-care groups, adding potential composition changes to Congress after the midterm elections are unlikely to impact its business. Government plans have been a a major growth driver for the insurer.

"The blue wave, to some degree, you might see more Medicaid expansion," she said.

Shares of UnitedHealth rose 4 percent in premarket trading following the report. It was up more than 3 percent in midmorning trade. UnitedHealth, with a market cap of more than $250 billion, has seen its shares rise more than 18 percent so far this year.

While other health players including CVS Health, Aetna and Cigna are embarking on major merger deals, UnitedHealth has doubled down on a strategy of reining in costs and expanding its medical services group.

"These results reflect our businesses delivering increased value at an accelerating pace to society and the millions of people we serve," UnitedHealth Group CEO David S. Wichmann said in a press release.

—Reuters contributed to this report.