Previously been identified by police as Tanja Otto, the teenager was tried behind closed doors because of her age. She was found guilty of attempted murder, causing grievous bodily harm and preparing explosives, a court spokesman said.
The girl stormed her secondary school in Sankt Augustin near Bonn on May 11 brandishing an arsenal including Molotov cocktails and a short sword.
Investigators say she planned to stab her teacher with the blade, then lock the classroom door and set off the firebombs.
However, while preparing her attack in the school toilets, she was disturbed by a 17-year-old fellow pupil, whom she hacked at with the sword.
A teacher raised the alarm and armed commandos specially trained to deal with a school massacre rushed to the scene. The 800 students at the school were told over loudspeakers to lock the doors and lie on the floor.
The 16-year-old fled but gave herself up later the same day to police at Cologne's main train station.
The incident came two months after 17-year-old boy sent shock waves through Germany when he shot dead nine pupils and three teachers at his old school in
Winnenden, and then three passers-by.