He has spent the last 11 days at the private King Edward VII hospital in Westminster, London.
Buckingham Palace said after the surgery that Philip was in "good spirits" and making progress.
Prince Philip has thanked well-wishers after being discharged from hospital following his hip operation.
Prince Philip was admitted to hospital on April 3 ahead of the planned procedure the following day, having suffered pain in the joint for about a month beforehand.
Guardiola Confirms Major Blow As 3 Players Miss Tottenham Trip
He made a huge effort, because after the action from Ashley Young against United, with problems in the knee, he could not train. They have been playing great with a lot of success in the last two, three seasons and are in the semi-final of the FA Cup.
The Queen's comment about Philip came during a brief walkabout after a visit to the King George VI Day Centre in Windsor to mark the 60th anniversary of her opening the building.
Anne said the 96-year-old was in good spirits.
He is expected to need a rehabilitation period and to use crutches for a number of weeks.
Philip, who is best known for his mischievous sense of humour, forthright manner and off-colour jokes, formally retired from public life past year but has attended some royal engagements since then.
Tesla kicked out of probe into fatal Model X crash
A percentage that's positive means that profits exceed costs - so analysts consider the investment as a net gain. The company said the crash was worsened by a missing or damaged safety shield on the end of the lane divider.
"The Duke of Edinburgh has undergone a successful hip replacement operation".
"The duke was keen to attend but made this decision because he was experiencing some trouble with his hip".
He did not accompany the Queen to church at Windsor Castle on Easter Sunday because of the problem, and it is understood it was also the reason he missed an annual Maundy service.
Hopefully this means he'll be in full functioning order for the wedding of Prince Harry, his grandson, to Meghan Markle next month.
Restaurant serves up $30 tarantula burgers
It's Exotic Meat Month and a North Carolina brewery is taking the opportunity to introduce customers to all types of meats. A restaurant in North Carolina is asking people if they're courageous enough to take the tarantula challenge .