Shares of The TJX Companies (TJX -0.86%) -- probably better known to shoppers as T.J. Maxx -- ran up 5.9% through 10:45 a.m. ET after the company announced a beat on both sales and earnings estimates Wednesday morning.

Heading into the quarter, analysts forecast TJX would earn $0.92 per share on $13.3 billion in sales. In fact, it earned $0.96 per share, and its revenue approached $13.5 billion.

TJX second-quarter earnings

TJX reported a 6% gain in second-quarter sales year over year, including a 4% gain in same-store sales (comps) in particular. (The rest of the sales gains came from opening new stores). The company then turbocharged that rather modest sales growth with a 50-basis-point increase in profit margins (now at 10.9%), resulting in total growth of 13% on the bottom line.

CEO Ernie Herrman pronounced himself "extremely pleased" with his company's performance, noting that sales growth has been a steady 6% so far this year, and comps growth is picking up. In light of this, management decided to raise guidance for the rest of this year.

Is TJX stock a buy?

What's curious is how that guidance was raised. Management says comps will grow only 2% to 3% in the third quarter, which would be a slowdown. But profit margins are forecast to expand substantially, to 11.8% or even 11.9% -- as much as a 100-basis-point sequential increase, resulting in profits per share of about $1.07.

TJX believes full-year comps will grow 3%, margins will average 11.2%, and profits will come in near $4.11 per share.

That's all pretty great news -- except for what it means for the stock's valuation. Divided into a $120 share price, $4.11 in profit implies a price-to-earnings ratio of 29. That's actually a bit high for a company growing sales at 6%, even if profits are growing twice as fast in the low teens.

All things considered, I would say this makes TJX a great business that's growing well, but not a cheap stock. Enjoy today's gains, investor. But at this price, the stock is not a compelling buy.