TORONTO (Reuters) - Canadian yoga wear retailer Lululemon Athletica Inc <LULU.O> reported comparable sales growth that fell short of analyst estimates, sending shares down nearly 9 percent on Thursday even as earnings were in line with expectations.

Second-quarter sales online and at stores open at least a year rose 5 percent, excluding exchange rate fluctuations. Analysts polled by research firm Consensus Metrix had expected a 5.9 percent increase.

Baird Equity Research analyst Mark Altschwager said the comparable sales miss would likely "fuel investor anxiety" given high expectations and the strong performance of Lululemon's stock. Before earnings, shares were up 46 percent year to date.

On a conference call, Chief Financial Officer Stuart Haselden reminded analysts and investors that Lululemon had an online promotion in the second quarter of last year. Excluding the impact of that sale, he said, comparable sales would have increased about 2 more percentage points.

"We did see traffic continue to be a headwind for us in the second quarter," said Haselden, adding that customers did make larger purchases, offsetting that trend. "I think we are not immune to what's happening from a macro standpoint."

U.S. retail sales were unexpectedly flat in July as consumers cut back on discretionary spending.

The Vancouver-based company forecast fiscal third-quarter earnings between 42 and 44 cents a share. Analysts, on average, had expected earnings of 44 cents for that quarter, according to Thomson Reuters I/B/E/S.

Once a market darling thanks to its successful move into the U.S. market, a feat few Canadian retailers accomplish, the company has struggled with embarrassing product recalls and inventory problems in recent years.

Inventory levels fell 1 percent in the quarter, to $277.3 million.

The company helped bring pricey women's yoga pants into the fashion mainstream before expanding into running and other sports. It now makes men's clothing, and its Ivivva line offers athletic clothing for younger clientele.

It competes with Nike Inc <NKE.N> and Under Armour Inc <UA.N>, as well as mainstream clothing retailers from Gap Inc <GPS.N> to Nordstrom <JWN.N>.

Net income rose to $53.6 million, or 39 cents a share, from $47.7 million, or 34 cents, a year earlier. Revenue rose 14 percent to $514.5 million. Excluding a tax and related interest adjustment, earnings were 38 cents a share.

On average, analysts had been expecting earnings of 38 cents a share and revenue of $515.5 million, according to Thomson Reuters I/B/E/S.

Shares dropped 8.6 percent to $70.07 in after-market trading.

(Reporting by Allison Martell; Editing by Alan Crosby and Matthew Lewis)