The 14-year-old defendants must also serve 150 hours of community service, undergo therapy and enroll in a character-building program, Riverside County Superior Court Judge Roger Luebs ruled Friday.
The victim, 13-year old Diego Stolz, was beaten to death at Landmark Middle School on Sept. 16, 2019.
A bystander's cellphone video shows Diego being punched and then falling and hitting his head on a pillar in the schoolyard. He died nine days later from head trauma.
The identities of his attackers have not been made public because they are minors.
Although Riverside County's district attorney and Probation Department both wanted the two teens to serve more time, Luebs said the law required the least restrictive terms to promote rehabilitation. He said the two boys were "directly responsible" for Diego's death even if they did not intend to kill him.
The district attorney and probation department both recommended that the teens serve more time, but the judge rejected it. Instead, he explained that the law required him to sentence them in the least restrictive terms to accomplish both rehabilitation and public safety.
Luebs added that to confine the teens to more time behind bars, with sophisticated and more mature criminals, would do more harm than good.
"The idea that they didn't go to youth prison shouldn't be seen as a slap on the wrist. Actually, they're going to have a lot of work to do to have to eventually complete the probation, which probably won't end until their 18th birthday," said defense attorney David Wohl.
Both attorneys for the teens also rejected both the district attorney and judge's claims that the boys lacked remorse or empathy for what they did.
"He is extremely remorseful. It was an incident that occurred when they were 13-years-old. There was trauma involved in that. They couldn't really process what was going on at the time," said defense attorney Ricson Dakanay.
The Stolz family did not want to comment following Friday's hearing.
The defendants, each of whom initially spent 47 days in juvenile hall, were ordered return to Juvenile Court on June 25 for a progress report to the judge.
He warned the boys that if they do not comply he would order them remanded back to juvenile hall.