Prince William has achieved a 2:1 honours in his geography MA degree from St Andrews University, Clarence House has announced.
Prince William studied for four years in Scotland
The announcement was made as the prince attended the annual Trooping the Colour with other members of the Royal Family.
William, 22, logged on to a secure internet site to find out his Master of Arts results on Saturday.
He did better than his father who received a lower second class honours in history from Cambridge.
"William got an upper second class honours," a Clarence House spokesman said.
"He's delighted. Everyone is absolutely delighted. His father's very proud."
William, second in line to the throne, had earlier said he hoped to get a 2:1 but that a lot depended on his 10,000-word dissertation on the coral reefs of Rodrigues.
Throughout William's four-year degree the public has seen a limited glimpse of his student life in Scotland, including footage of him relaxing and pursuing his sporting interests.
Newspapers agreed to show restraint in their coverage of the prince to allow him to enjoy as normal a student life as possible.
In interviews to mark his 21st birthday in June 2003, the prince said he had had initial doubts about staying at the university, but eventually settled down.
He also changed his degree from history of art to geography.
William intends to join the Armed Forces, but will first travel to New Zealand for the Lions rugby tour and perform his first solo royal engagement.
He will represent the Queen at a commemoration of the end of World War II.