Buckingham Palace said Prince Phillip will now return to the Royal Family’s Sandringham estate in Norfolk.
The Duke of Edinburgh had been in Papworth Hospital since Friday when he had a coronary stent fitted after being admitted following chest pains.
Prince Philip, who left by road and waved to reporters, missed the royal Christmas celebrations and had to sit out the traditional Boxing Day shoot.
He sat upright and smiled broadly as he left the hospital.
In a statement, Buckingham Palace said: “On departure, Prince Philip thanked the staff at Papworth for the excellent care he has received during his stay.
“He is very much looking forward to rejoining his family.”
The Duke of Edinburgh is said to have been advised by doctors to rest.
The Queen, 85, has been briefed regularly on her husband’s condition.
Stenting involves inserting a tube called a stent into an artery, to improve blood flow.
The Duke of Edinburgh’s next formal engagement is not until 17 January when he is due to attend a dinner at the Scott Polar Research Institute at the University of Cambridge.
Usually on Boxing Day Prince Philip would lead the Royal Family’s shooting party.
But this year he was under doctor’s orders not to leave his bed while he was kept under observation.
This is the most serious health scare suffered by the normally spry nonagenarian.
Prince Philip usually accompanies the Queen and in the autumn he travelled to Australia on a 11-day official visit to Perth, Melbourne, Canberra and Brisbane.
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…
Misleading allegations, rumours and outright lies about voting and fraud are flooding online spaces in…
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…