The 94-year-old had been in the hospital since December 8. He was diagnosed with a lung infection and also had a procedure to remove gallstones.
In recent days, officials have said Mandela is improving, but doctors have taken extraordinary care with his health because of his age.
Presidential spokesman Mac Maharaj says Mandela will receive more medical care at his Johannesburg home until he fully recovers.
Maharaj requested that the public respect Mandela's privacy at this time.