By Dave Sebastian

UnitedHealth Group Inc. said profit for the second quarter rose as the company accounted for the deferral of care due to the coronavirus pandemic, though it expects results to be tempered in quarters ahead by the pandemic's cost and economic effects.

The parent of the nation's largest health insurer posted net income of $6.64 billion, or $6.91 a share, compared with $3.29 billion, or $3.42 a share, in the same period last year. Adjusted earnings were $7.12 a share.

Analysts polled by FactSet were looking for earnings of $5.02 a share, or $5.28 a share on an adjusted basis.

The company posted revenue of $62.14 billion, up 2.5% from the comparable quarter last year. Analysts were expecting $63.48 billion.

The medical-loss ratio -- the percentage of premium revenue spent on health care -- at its insurance unit fell to 70.2% from 83.1% in the prior year due to the temporary deferral of care amid the pandemic. Access to and demand for care were limited from mid-March to April but approached more typical levels toward the second quarter, the company said. Analysts were looking for a medical-loss ratio of 78.2%.

The company's UnitedHealthcare unit recorded revenue of $49.1 billion, up from $48.6 billion in the year-ago period due to growth in public-sector and senior programs, offset by commercial enrollment declines. Sales in its Optum health-services business grew to $32.7 billion from $28 billion in the same period last year.

Operating costs fell to $52.9 billion from $55.85 billion for the quarter. The company said it has set a provision of $3.5 billion for customer assistance, such as through cost-sharing waivers, and care-provider funding.

The company continues to expect 2020 earnings of $15.45 a share to $15.75 a share, or $16.25 a share to $16.55 a share on an adjusted basis.

Write to Dave Sebastian at dave.sebastian@wsj.com