Austria's APA news agency reported that a 10th victim died later in hospital of her wounds.
Authorities were not immediately available to confirm the report.
Interior Minister Gerhard Karner said six of the victims killed in the school were female and three were male, and that 12 people had been injured.
He gave no further details to identify the victims but Austrian media said most were pupils.
Police said they assumed the 21-year-old Austrian shooter, who was found dead in a bathroom, was operating alone when he entered the school with two guns and opened fire.
His motive was not yet known.
"The rampage at a school in Graz is a national tragedy that has deeply shaken our entire country," Austrian Chancellor Christian Stocker said, calling it a "dark day in the history of our country".
"There are no words for the pain and grief that we all - all of Austria - are feeling right now."
Stocker travelled to Graz where, at a press conference alongside other officials including Karner, he announced three days of mourning, with a minute's silence to be held at 10am on Wednesday.
Austrian newspaper Kronen-Zeitung said police had found a farewell note from the shooter during a search of his home.
It did not say what was in the note and police were not immediately available to comment.
The killings caused shock and consternation in Austria, a usually peaceful country unaccustomed to multiple fatalities of the kind that occurred in Graz, its second-biggest city.
More than 300 police were called to the scene after shots were heard about 10am at the school where pupils of age 15 and above attend.
Police and ambulances arrived within minutes and authorities cordoned off the school.
Relatives of the victims and pupils were being cared for, authorities said.
The Salzburger Nachrichten newspaper said in an unconfirmed report that the suspect had been a victim of bullying.
Armed with a pistol and shotgun, he opened fire on pupils in two classrooms, one of which had once been his own, it said.
Authorities said he appeared to have legally owned the two weapons.
Police said investigations into a possible motive were ongoing and that they could not yet provide any information.
"Extensive criminal investigations are still required," a police spokesperson said.
Julia Ebner, an extremism expert at the Institute for Strategic Dialogue think-tank, said the incident appeared to be the worst school shooting in Austria's post-war history, describing such shootings as rare compared to some countries including the United States.
"I am deeply shaken that young people were torn from their lives so abruptly," German Chancellor Friedrich Merz, one of a number of foreign leaders who expressed shock at the shooting, said in a message to Stocker.
"We hope that their loved ones can find comfort in the company of their families and friends in this dark hour."
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.
with AP