A New York City law requiring restaurants to post the calories of their menu items led Starbucks customers to consume 6 percent fewer calories per transaction, a Stanford University study found.

For people who averaged more than 250 calories per purchase, calorie consumption fell by a more dramatic 26 percent, the study said.

Calories per transaction fell on average to 232 from 247, the study found. The impact was almost entirely on food choices, not beverages, said the authors, who persuaded Starbucks to provide them with sales data enabling them to observe every transaction from January 2008 to February 2009.

"There is no impact on Starbucks profit on average, and for the subset of stores located close to their competitor Dunkin' Donuts, the effect of calorie posting is actually to increase Starbucks revenue," said the study dated January 2010.

With U.S. obesity rates on the rise, New York required chain restaurants to post calorie counts in 2008. Several other states have followed and there is legislation before the U.S. Congress, said the study by researchers Bryan Bollinger, Phillip Leslie and Alan Sorensen.

U.S. obesity rates rose to 26.6 percent in 2008 from 15.9 percent in 1995, according to a 2009 study by the Centers for Disease Control and Prevention.

Starbucks had no immediate comment Wednesday.