Thatcher, her arm held by a hospital staff member, waved to photographers before ducking into a Jaguar car outside St. Thomas' Hospital in south London, where she had been taken after feeling faint. She waved again as she stepped into her London home a few minutes later.
The 82-year-old former Conservative leader had felt unwell during dinner with friends near the House of Lords in central London, according to her private secretary Mark Worthington and her daughter, Carol.
British Prime Minister Gordon Brown said on Saturday morning that he was sorry to hear of the illness and wished Thatcher "a very speedy recovery."
Carol Thatcher said her mother was hospitalized as a precaution.
"Very wisely, at her age and with a history of little strokes, they decided to err on the side of caution," she said. "But it's good news today. She is doing well."
Thatcher - Britain's first female prime minister - cut down on her workload in March 2002 after doctors said she suffered a series of strokes. She has often appeared at private functions in recent years but makes few public statements.
She urged members of her Conservative Party to "hold firm to their beliefs" as she was honored with a statue at the party's headquarters on Feb. 19.
"Today, as we face the challenges of the future, let us remain steadfast and sure. Let us set a clear course for our country," she said.
Nicknamed the "Iron Lady," Thatcher was prime minister from May 1979 until her resignation in November 1990. She was the first leader to win three consecutive elections.
Thatcher dominated British politics in the 1980s and was a firm supporter of her ideological colleague U.S. President Ronald Reagan.
She was also a divisive figure and her Conservative Party was riven by disputes when she fell from power.
Thatcher's husband, Sir Denis, died in 2003.