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.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…