DEERFILED, ILL. — Due in part to the sale of 13 company-owned restaurants to a franchisee as well as the closing of several company-owned restaurants, Cosi, Inc. posted a loss during the second quarter.

For the quarter ended June 27, the company suffered a loss of $634,000, which compared with income of $3,793,000 during the same quarter of the previous year. Revenue for the quarter was $26,897,000, down 9% from $29,623,000 during the same quarter of the previous year.

“We’re encouraged by the significant year-to-year improvement in operating margin we achieved in the second quarter in spite of a challenging consumer spending environment,” said James Hyatt, president and chief executive officer. “At the same time, we reduced our administrative costs in the 2011 second quarter by $239,000, or 7%, as compared to the same quarter later year. Our focus continues to be on driving sales and traffic across all dayparts, while remaining committed to controlling restaurant and administrative costs.”

For the six months ended June 27, the company posted a loss of $2,774,000, which compared with income of $739,000 during the same period of the previous year. Revenue for the six months was $50,606,000, down 12% from $57,221,000.