Shares of American Eagle Outfitters (NYSE:AEO) are down almost 10% since the company released its second-quarter earnings of Aug. 29. Yet the decline seemed unjustified, since AEO's numbers soundly beat analysts' expectations.

Revenue rose 14% annually to $964.9 million, beating expectations by $26.6 million. Its comparable-store sales were up 9% compared to just 2% growth in the prior-year quarter, and net earnings surged 79% to $0.34 per share, topping estimates by $0.03.

A model wearing American Eagle apparel.

Image source: American Eagle Outfitters.

Let's take a look at why AEO's stock dropped, and why this dip could be a great long-term buying opportunity.

The key numbers

AEO has two main brands -- its namesake, which generates most of its revenue with mid-range casual wear and jeans; and Aerie, a higher-growth lingerie and activewear brand that targets younger female shoppers. Here's how the two brands' comparable-store sales have fared over the past year:

Brand

Q2 2017

Q3 2017

Q4 2017

Q1 2018

Q2 2018

American Eagle

0%

1%

5%

4%

7%

Aerie

26%

19%

34%

38%

27%

Total

2%

3%

8%

9%

9%

Comps growth by brand. Data source: AEO quarterly reports.

AEO attributes its accelerating sales growth at American Eagle to robust demand for its jeans and bottoms, rebounding demand for men's apparel (previously a soft spot), and speed-sourcing strategies to keep pace with fast fashion rivals like H&M. During the conference call, American Eagle chief Chad Kessler noted that the brand "delivered record sales volume on less promotional activity," which boosted its overall margins.

Aerie continued to profit from its branding as the "anti-Victoria's Secret." The brand's body-positive marketing campaigns, which feature untouched photos and models of all shapes and sizes, continues to attract consumers. Its comps were significantly boosted by strong sales of apparel, core bras, underwear, and swimwear during the quarter.

Aerie chief Jennifer Foyle also noted that the brand saw its "best core bra comps in over two years," and she reiterated the brand's long-term goal of generating $1 billion in annual sales. Aerie seems to be pulling customers away from L Brands' Victoria's Secret, which posted a 1% comps decline last quarter.

On the digital front, AEO continues to invest in the expansion of its e-commerce apps and loyalty programs. Its digital sales grew at a double-digit rate for the 14th straight quarter and accounted for 24% of total revenue.

AEO's margins are also expanding, indicating that it isn't driving its sales growth with markdowns. Gross margin rose from 34.9% in the prior-year quarter to 36.6%, while its operating margin jumped from 4.6% to 7.9%.

So why did the stock tumble?

AEO's numbers look rock-solid, but they were slightly inflated by two factors. First, a calendar shift versus the prior-year quarter added about $40 million to third-quarter revenue. If we exclude that gain, revenue rose about 10% year over year. On the bottom line, earnings per share was significantly boosted by U.S. tax reform, which reduced the company's effective tax rate from 34.7% in the prior-year quarter to 21.9%.

AEO expects its third-quarter comps to grow in the high single digits but for its total revenue to only rise by the mid single-digits. However, that's mostly due to the aforementioned $40 million, which was moved back to the second quarter by the calendar shift. However, it was the earnings guidance that spooked investors. Its forecast for earnings of $0.45 to $0.47 per share, which implies 22% to 27% growth, missed the consensus estimate of $0.49. That is a minor miss, but investors were probably looking for reasons to take profits as the stock has more than doubled over the past 12 months.

Why this could be a buying opportunity

Despite that hiccup, AEO's core growth engines are strong, its margins are expanding, and it can still build its smaller Tailgate and Todd Snyder brands into new pillars of growth.

At about $25 per share, AEO stock trades for just 17x this year's earnings. That is a bargain relative to analysts' forecasts, which call for 29% earnings growth this year and 9% growth in 2019. AEO also pays a solid 2.1% dividend.

Some investors might be eager to take profits in AEO, but I think this "best in breed" retailer still has plenty of room to run.

Leo Sun has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.