As a landmark trial begins over who should pay for the nation’s opioid crisis, a new report estimates the epidemic has cost the U.S. economy at least $631 billion — and that more than two-thirds of that toll fell on individuals and the private sector.

A study released this week by the Society of Actuaries identified which parts of the economy have suffered the most from one of this century’s worst public health crises. The actuaries found that the epidemic’s biggest costs stemmed from the unrealized earnings of those killed by the highly addictive painkillers and health care expenditures during the four-year study period ending in 2018. They also projected that the 2019 price tag would range from $172 billion to as much as $214 billion.

The report was released as a federal trial on the epidemic was getting underway in Cleveland, a case widely seen as a bellwether for how future lawsuits against drug companies are handled. The case involves two Ohio counties, Cuyahoga and Summit. Yet the immensely complicated litigation will zero in on scores of accusations related to the opioid crisis that has claimed hundreds of thousands of lives — and on who should be held liable.

The plaintiffs, who will need a unanimous verdict for any of the companies to be held liable, allege that corporations failed to maintain effective controls over their drugs and allowed pain pills to pour onto the black market. The defendants contend they followed the law and blame doctors, drug abusers, the Drug Enforcement Administration and others for the crisis.

According to the actuaries’ analysis, nearly one-third — $205 billion — of the estimated economic burden was pinned to excess health care spending for people with opioid-related disorders. Premature mortality costs accounted for 40 percent — $253 billion — of estimated losses, mainly due to lost lifetime earnings for people who died from overdoses.

The remaining economic losses were linked to costs associated with the criminal justice system, child and family assistance programs and lost productivity, including absenteeism, lower workforce participation rates and incarceration for drug-related crimes.

Just under a third of the total estimated losses — $186 billion — fell on federal, state and local governments, the report found.

According to the national Centers for Disease Control and Prevention, nearly 400,000 people died from drug overdoses involving prescription or illicit opioids from 1999 to 2017.

In July, a database from the Drug Enforcement Administration that tracks the path of every pain pill sold in the U.S. was made public for the first time. The database — which includes transfers from manufacturers and distributors to pharmacies in every town and city — was released as part of a civil action brought by nearly 2,000 cities, towns and counties alleging that nearly two dozen drug companies conspired to flood the country with opioids.

A Washington Post analysis of the database found that America’s largest drug companies distributed 76 billion oxycodone and hydrocodone pain pills nationwide from 2006 to 2012. Six companies distributed 75 percent of the pills during that period.

The Post also found that the volume of pills handled by the drug companies climbed as the epidemic surged, from 8.4 billion in 2006 to 12.6 billion in 2012. West Virginia, Kentucky and South Carolina recorded the highest concentrations of pills per person per year.

Opioid death rates also soared in communities with the largest inflow of pain pills. The national death rate from opioids was 4.6 deaths per 100,000 residents.

The Society of Actuaries, which includes more than 30,000 members, drew from administrative claims data, federal surveys, databases and peer-reviewed literature to come up with its tally.

According to polling by the Kaiser Family Foundation, more than 4 in 10 people know someone who has been addicted to prescription painkillers, and 1 in 5 knows someone who died of an overdose of prescription opioids.

But those same polls show that 69 percent blame doctors for the prescription drug epidemic, 68 percent blame people who use the drugs, and 60 percent blame drug companies.

Lenny Bernstein contributed to this report.