Hamburger chains McDonald's ( MCD) and Wendy's ( WEN) reported strong second-quarter earnings Thursday, both matching analysts' consensus.

Oak Brook, Ill.-based McDonald's earned $590.7 million, or 47 cents a share, in the quarter ended June 30. That's up 25% from the previous-year's profit of $470.9 million, or 37 cents a share.

Total revenue was $4.73 billion, up from $4.28 million a year ago. Systemwide sales increased 11%, while same-store sales were up 7.8%, which the company said last week was its highest gain since 1987.

Shares were rising 16 cents, or 0.6%, to $27.82 in Thursday premarket trading.

"This quarter's performance reflects higher sales, more customer visits and enhanced profitability," said McDonald's Chief Executive Charlie Bell. "We're increasing McDonald's relevance and keeping our brand in demand with faster service, better-tasting and more contemporary food and beverage offerings, cleaner, more modern restaurants, attractive everyday value, and hip, fresh marketing."

U.S. company-operated margins for the quarter were 19.5%, a level not reached since 1994, the company said. It said commodity costs were challenging.

Meanwhile, rival Wendy's had a 17.2% increase in second-quarter earnings to $71.6 million, or 62 cents a share, in the three months ended June 27. That compared with a profit of $61.12 million, or 53 cents a share, in the year-earlier quarter.

The company cited a lower tax rate, a positive benefit from Canadian currency exchange and cost controls. Wendy's also introduced its new Chicken Temptations sandwiches and Homestyle Chicken Strips during the quarter.

Revenue in the quarter was up 15.6% at $909 million. U.S. company same-store sales increased 5.9%, up from the prior year's 2.3% decrease, while same-store sales at U.S. Tim Horton's restaurants jumped 10.2% vs. a 3.3% increase last year.

Wendy's said its beef prices will be $1.31 per pound in the third quarter, compared with $1.17 last year. But commodity costs for chicken and produce will remain stable because the company's annual contracts lock in prices.

If you liked this article you might like

Hot Topic's Relief Bounce

Hot Topic's Relief Bounce

Limited Brands Profit Jumps

Limited Brands Profit Jumps

Glitch Lingers at Ross Stores

Glitch Lingers at Ross Stores

Dillard's Halves Loss

Dillard's Halves Loss

Do-It-Yourself Boost for Economy

Do-It-Yourself Boost for Economy