More than 150 inmates were held in prison beyond their sentencing time because of various staff errors, an internal Justice Department report has found.

Among those who served excess time between 2009 and 2014, three spent at least an extra year behind bars, including one who spent more than three extra years due to the errors. Mistakes ranged from miscalculations of sentence credits to simple computing errors.

Although most of the inmates held past their release date served a month or less of extra time, US Justice Department Inspector General Michael Horowitz reported that the government spent at least $1 million to incarcerate the prisoners for the additional time, and settle related lawsuits, according to Reuters.

The 152 prisoners represent a small fraction of 462,000 federal inmates released during the same period, but the audit report identified 4,000 inmates whose releases were classified as "untimely," but not caused by staff error.

"Neither the Department nor the [Bureau of Prisons] has attempted to work with the other agencies to examine these cases, and they don't appear to fully understand all of the actions that can contribute to untimely releases," Horowitz said in a video accompanying the report.

Late releases aren't uncommon, and highlight the challenges that prisons have faced in calculating prisoners' release time across the country. Terence Davidson, a paralegal with the Legal Aid Society in New York, told Al Jazeera that he helps correct 100 to 200 sentences annually. In Alaska, for example, more than 100 inmates in Alaska have also been held beyond their release dates over the past five years, largely due to clerical errors. In 2007, the Massachusetts Department of Corrections admitted that its method of calculating the dates for inmate releases was faulty and had resulted in 14 inmates being held past their release dates.

The government watchdog's report also included five inmates who were mistakenly released early during the same period.

In February, Washington state's governor announced that as many as 3,200 state prisoners may have been released early since 2002. The revelation caused an uproar, particularly after it emerged that one of the prisoners released early had been re-arrested and charged with a with first-degree murder.