San Francisco, Calif.-based Gap (GPS 0.77%) shares ended the day in the red Thursday, off 1.6% ahead of earnings and then dropped a little bit more after the earnings news came out.

And yet, the earnings were not bad. Expected to earn $0.64 in its fiscal second quarter, Gap earned... $0.64, a 31% year-over-year increase. Expected to book $3.83 billion in sales, the company surprised analysts with $3.87 billion, an 8% improvement.

Same-store sales increased 6% at each of Gap and Old Navy. Banana Republic comps were down 1%. Gross margins grew 60 basis points in the quarter to 40.5%. Operating profit margins were up 160 b.p. at 13.5%.

Commenting on the results, CEO Glenn Murphy noted that Gap "delivered strength in both our top and bottom lines this quarter," and plans to show "continued momentum across our portfolio of brands" in the second half.

Looking forward, the company is increasing its earnings estimates for the full year, predicting that when 2013 draws to a close, it will have earned between $2.57 and $2.65 per share.