Prince William graduated with a degree in geography from St. Andrews University in Scotland Thursday, with his grandmother and other royals looking on.
The 2.1 class degree beats his father's 2.2 from Cambridge, and puts him among the most academically successful royals.
The 23-year-old William will spend the summer working in London, as well as joining a mountain rescue team. He has expressed interest in a career in the army.
The prince said he had "thoroughly enjoyed" his four years at the Scottish university and was "sad to leave."
"I just want to say a big thank you to everyone who has made my time here so enjoyable," he said.
"Today is a very special day for me and I am delighted that I can share it with my family, and in particular with my grandmother, who has made such an effort to come, having been under the weather."
Earlier this week, the queen canceled some engagements because of a cold.