Graz Mayor Elke Kahr was on Tuesday quoted by Austrian news agency APA as saying the attacker was also dead, and that many of the injured had been taken to hospital following the shooting, which she called a "terrible tragedy".
Police gave no initial toll but said "several" people were dead and they were working in the assumption there was only one attacker. APA video showed emergency workers loading a stretcher into an ambulance.
The reports did not specify how many of the dead were pupils. Ambulances were on the scene outside the school.
A local police spokesman said the area had been secured, the school had been evacuated and relatives of the victims and pupils were being cared for.
"There is no further danger for the population, but there are several dead," he told Austrian television.
Salzburger Nachrichten newspaper cited unconfirmed reports as saying the suspect was a 22-year-old former student who carried two weapons - a pistol and a shotgun. Kronen Zeitung tabloid said a suspect had been found dead in a bathroom. Reuters could not immediately confirm this.
"It's incomprehensible and unbearable. My sympathy and grief go out to the victims and their families. No one can imagine the suffering; as a mother of three children, it breaks my heart," Austria's Minister for European and International Affairs Beate Meinl-Reisinger wrote on X.
European Union foreign policy chief Kaja Kallas said on X: "Every child should feel safe at school and be able to learn free from fear and violence. My thoughts are with the victims, their families and the Austrian people in this dark moment."
Austria has one of the most heavily armed civilian populations in Europe, with an estimated 30 firearms per 100 persons, according to the Small Arms Survey, an independent research project.
Machine guns and pump action guns are banned, while revolvers, pistols and semi-automatic weapons are allowed only with official authorisation. Rifles and shotguns are permitted with a firearms license or a valid hunting licence, or for members of traditional shooting clubs.
Four people were killed and 22 injured when a convicted jihadist went on a shooting spree in the centre of Vienna in 2020. In November 1997, a 36-year-old mechanic shot dead six people in the town of Mauterndorf before killing himself.
Lifeline 13 11 14
Kids Helpline 1800 55 1800 (for people aged 5 to 25)