(Adds earnings details, share movement)
CHICAGO, Aug 17 (Reuters) - Wal-Mart Stores Inc on Thursday reported its 12th straight quarterly increase in comparable sales, but margins fell as the retailer continued to cut prices and invest in its e-commerce operations.
Shares of Wal-Mart were down 2.4 percent at $79.07 in premarket trading.
Wal-Mart said sales at U.S. stores open at least a year rose 1.8 percent, excluding fuel price fluctuations. That is stronger than market expectations for a rise of 1.7 percent, according to research firm Consensus Metrix.
Net income attributable to Wal-Mart during the second quarter ended July 31 fell 23 percent to $2.9 billion, or 96 per cents per share, from $3.7 billion, or $1.21 per share, a year earlier due to a loss from repurchasing debt after a bond tender offer.
Excluding special items, earnings per share of $1.08 exceeded the analysts' average estimate of $1.07, according to Thomson Reuters I/B/E/S.
Gross margins were down 11 basis points to 25 percent, including a five-basis-point decline in the United States.
Online sales increased 60 percent, decelerating from the 63 percent growth in the previous quarter. That business added 70 basis points to comparable sales.
Wal-Mart raised the low end of its earnings outlook for the full year to $4.30 per share from $4.20, excluding items, while keeping the high end at $4.40. (Reporting by Nandita Bose in Chicago; Editing by Lisa Von Ahn)