Sales at stores open at least a year — a key retail gauge known as same-store sales — rose 10 percent. Drink prices went up an average 11 cents in the quarter.

“They had a good quarter,” said McAdams Wright Ragen analyst Dan Geiman. “It’s hard to argue otherwise when their earnings grow by 31 percent.”

The results were a good gift to Chief Executive Orin Smith, who will retire in March. Yesterday was his last quarterly conference call as CEO.

Smith attributed the sales growth to the popularity of Starbucks’ seasonal coffee drinks, including the pumpkin spice latte, and strong sales of other products, such as the CD “Ray Charles: Genius Loves Company.”

A year ago, Starbucks had reported its strongest holiday season, with a 10 percent jump in same-store sales.

“Everybody said at the time, ‘What are you going to do for an encore?’ ” Smith recalled. “There’s only one answer to that: It was to have an even better one. That’s effectively what happened here.”

The company meantime raised its fiscal-year profit guidance, saying it expected to earn $1.15 to $1.17 a share.

It opened 642 company-operated stores in the quarter and spent more running each store.

Store operating expenses as a percentage of sales increased to 38.3 percent from 37.6 percent a year ago as Starbucks spent more on marketing and hiring to help prepare for its aggressive growth plans.

Starbucks in November set a long-term goal of 30,000 stores — 15,000 in the U.S. and 15,000 abroad. It expects to open 1,500 stores this fiscal year.

“This market, on a global basis, is enormous,” Smith said. “We’re going to have our hands full for years to come trying to fill the potential that exists for us.”

The company’s shares rose $1.34, or 2.5 percent, to close at $55.34, but shed 99 cents in extended trading because analysts had expected projected earnings for the year would be higher. Starbucks reported its quarterly results after the markets closed.