The Duke of Edinburgh smiled as he left hospital on Saturday morning in time to celebrate his 91st birthday on Sunday.
Philip shook hands with and thanked staff at King Edward VII Hospital in central London after spending five days there having treatment for a bladder infection.
A Buckingham Palace spokesman said the Duke would be spending his birthday "privately".
Philip is not due to attend his next scheduled engagement until Tuesday, when the Queen hosts a garden party at the Sandringham Estate to mark her Diamond Jubilee.
It is hoped her husband will be by her side at her Norfolk retreat if he is feeling strong enough following his discharge from hospital.
It is also hoped he will be able to accompany her to the East Midlands on Wednesday for a two-day visit as part of the Queen's Jubilee tour of the UK.
Philip's admission to hospital meant he was forced to miss some of the Jubilee celebrations this week.