SACRAMENTO — The counselor at Salinas Valley State Prison paid a surprise visit to Nicholas Shearin's cell with good news: He would go home in two days, after a decade behind bars.
She did not mention that he should have been freed eight months earlier.
Shearin was among as many as 33,000 state inmates whose sentences may have been wrong because they were not given all the time off they earned for good behavior and for working in prison.
Records obtained by The Times show that in August, the state sampled some inmate cases and discovered that in more than half -- 354 of 679 -- the offenders were set to remain in prison a combined 104 years too long. Fifty-nine of those prisoners, including Shearin, had already overstayed and were subsequently released after serving a total of 20 years too many, an average of four months each.
Shearin, 38, who is living with his parents in Hawthorne and looking for a job, went to prison for armed robbery. He received less than a third of the good-behavior credit he was due on a second crime, assaulting another inmate.
Shearin said he had told the corrections staff that he was entitled to more time off his sentence.
"I argued that point," he said. "I put in all the paperwork."
But "they did what they wanted to do at the Department of Corrections," said Shearin, who learned from a reporter that he had stayed in prison too long. "They just told me no."
The errors could cost the state $44 million through the end of this fiscal year if not corrected and more than $80 million through mid-2010. But California's overburdened prison agency waited more than two years to change its method of awarding credit for good behavior after three court rulings, one as early as May 2005, found it to be illegal.
Officials were giving some inmates 15% good behavior time instead of the 50% to which they were entitled. The state fixed release dates for only those inmates who requested it, according to a spokesman for the Department of Corrections and Rehabilitation, who said there was no evidence in Shearin's file that he complained.
Aside from the survey in August, the department did not change its methods for all prisoners until last month, when it began reviewing release dates. Officials said that with too little staff, antiquated computers, too many inmates and a web of arcane sentencing formulas, the job was unmanageable.