Martha Stewart, who built a multimillion-dollar empire around her own cooking, decorating and entertaining visions, was sentenced today to five months in prison for lying to investigators about a stock sale.

The stock sale that brought her relatively little financial gain but has cost her heavily in terms of her reputation.

She also received two years of supervised probation and a $30,000 fine. Five months of her probation will be home detention.

Ms. Stewart’s lawyers said they would appeal her conviction, and she will remain free pending that appeal.

After her sentencing, Ms. Stewart emerged from the court and talked defiantly about how a “small, personal matter” had been “blown out of proportion.”

“Today is a shameful day,” she said. “It’s shameful for me and for my family and for my beloved company and for all of its employees and partners.”

Ms. Stewart was not convicted on any charges of insider trading, only for lying about the trade to investigators.

“What was a close personal matter became an almost fatal circus of unprecedented proportions,” she said, adding that 200 people at her company had lost their jobs as a result of the publicity surrounding her legal troubles.

And in the plucky style for which the self-made millionaire is known, Ms. Stewart urged people to buy her magazine, and advertisers to keep purchasing ads. Meanwhile, she said, she will face whatever comes.

“I’m not afraid. I’m not afraid whatosever,” she said.

The guidelines recommended a sentence of 10 to 16 months in prison for someone convicted of such crimes who has no previous record of criminal activity and is not considered a threat to society. Judges can add to or reduce a sentence for various reasons, including perceptions of the defendant’s acceptance of responsibility.

Ms. Stewart arrived at federal court this morning appearing grimfaced and accompanied by her daughter, Alexis, her son-in-law, John Cuti, who is also an attorney, a bodyguard and other lawyers. A horde of reporters, news cameras and onlookers had been awaiting her arrival, and some of those in the crowd cheered as Ms. Stewart, dressed in a dark pantsuit, stepped from a sport utility vehicle and walked up the courthouse steps without saying anything to the crowd.