City jails held an average of 3,931 prisoners a day in 2016 who were behind bars because they couldn’t make bail — costing taxpayers about $116 million, according to a report released Thursday.

Those suspects made up about 40 percent of the average daily population of 9,790, according to an analysis by the city’s Independent Budget Office.

In about half the cases where bail was a stumbling block, the difference between freedom and incarceration was $5,000 or less.

“It confirms that the vast majority of people are on Rikers Island because they can’t afford bail, they’re overwhelmingly black and brown, many of them are there for nonviolent, low-level offenses — and all of this is at enormous expense to taxpayers,” said City Councilman Rory Lancman ­(D-Queens), who requested the review.

Lancman said the data should spur the city to speed up its 10-year timeline for shuttering Rikers Island, an initiative that depends on cutting the jails population in half — in part through bail reform.

Lancman called on the city to expand its supervised-release programs — an alternative to pretrial detention — which the city tripled in size in 2015 to cover 3,000 people.

City Hall officials said they’ve implemented programs to make it easier to make bail, including adding ATMs at courts that lacked them.

They said they’re planning to launch an online credit-card system for bail payments this summer.

Council Speaker Melissa Mark-Viverito has already spurred the city to set up a $1.4 million citywide bail fund to help cover bail amounts of $2,000 or less.

“We believe no one should be detained simply because they can’t afford bail, and we’ve invested in an array of strategies — including new diversion programs and efforts to make it easier to pay bail — to reduce the number of low-risk people who enter our jails,” said City Hall spokeswoman Natalie Grybauskas.

The IBO report shows that 18 percent of pretrial detainees were charged with drug-related offenses, while 16 percent were charged with assault.