The cost to house an inmate in a city jail has ballooned to a record $337,524 per year — even as the Big Apple’s prison population continues to plummet, a report released Friday says.

Comptroller Scott Stringer’s office released an analysis showing the city’s average jail population for the fiscal year ending June 30, 2019, fell to 7,938 — a 10.7 percent drop from the previous year and its lowest total since 1980.

However, the city’s cost per inmate has ballooned by 161.2 percent over the past decade — up from $129,215 in fiscal 2009. This includes a $32,521 rise in spending, or 10.7 percent, in the past year alone.

Despite the added spending and smaller jail population, the rate of detainee assaults on staff has more than tripled over the past decade — including 37 percent in the past year.

Fights and assaults among prisoners have also tripled over the past 10 years, including 11.7 percent since fiscal 2018.

“Although our jail system has shrunk, this analysis shows that the system has not changed, as spending, violence, and the use of force continue to rise disproportionately,” Stringer said.

“For long-term savings — and the long-term good of our city — we must start seeing better all-around outcomes as our jail population declines.”

The Department of Correction’s overall budget was $1.3 billion in fiscal 2019, a 4 percent drop from the previous year.

There are currently about 7,000 inmates in the city jail system as Mayor Bill de Blasio continues to take steps to reduce the prison population as part of his larger effort to shutter the scandal-scarred Rikers Island prison complex by 2026.

The mayor is banking on the population dropping to 4,000 by 2026 when Rikers is expected to be replaced by four smaller new jails in every borough but Staten Island.

The DOC attributed the rising costs for taking care of inmates on staff training and other efforts aimed at making jails safer for detainees and correction officers.

“As the jail population continues to fall, we are now managing a population of people charged with more serious offenses,” the agency added in a statement. “In cases of serious injuries to both staff and people in custody, we are encouraged by the fact that the actual number of people injured is down.”

However, Elias Husamudeen, president of the Correction Officers Benevolent Association, said the DOC “seems to be operating with alternative facts.”

“If the DOC was truly spending more money to make our jails safer, then how can they possibly explain the 37 percent increase in assaults on correction officers last year and the continued inmate violence we see throughout the department in facilities on and off Rikers Island?” he said.