The high cost of health care is persisting during the pandemic, even for people lucky enough to still have job-based insurance.

The average annual cost of a health plan covering a family rose to $21,342 in 2020, according to the latest survey by the Kaiser Family Foundation, a nonprofit group that tracks employer-based coverage. Workers paid about a quarter of the total premiums, or $5,588, on average, with their employers picking up the rest of the cost.

An analysis of the results was published Thursday online in Heath Affairs, an academic journal. While premiums rose only slightly from the 2019 survey, the increase in premiums and deductibles together over the last decade has far outpaced both inflation and the growth in workers’ earnings. Since 2010, premiums have climbed 55 percent, more than double the rise in wages or inflation, according to the foundation’s analysis.

About 157 million Americans had coverage from their employer before the pandemic, but millions have lost their insurance along with their jobs over the past several months. Many experts expect more people to lose coverage in the coming months as companies lay off workers or drop their health benefits.

“Nothing changed much, but then everything changed,” said Gary Claxton, a senior vice president at the foundation. The survey was conducted from January through July of this year, making it hard for the researchers to see how the changed circumstances will affect costs and employers’ willingness to pay for coverage.

“Things may look different moving forward as employers grapple with the economic and health upheaval sparked by the pandemic,” Drew Altman, the foundation’s chief executive, said a statement.

The survey also underscored how much workers with health insurance still have to spend out of pocket for their care. In addition to paying for their share of premiums,