Target (NYSE:TGT) posted its best quarterly performance in years during the first quarter of fiscal 2019. Comparable sales rose 4.8% and Target's operating margin expanded slightly, driving 9% growth in operating income and a 16% surge in adjusted earnings per share (EPS). EPS surpassed the high end of the company's guidance range by $0.01, reaching $1.53.

The discount retail giant outdid itself in the second quarter. On Wednesday morning, Target reported that, while sales growth slowed a bit last quarter, EPS skyrocketed more than 20% year over year. This stellar performance caused Target stock to jump 20% on Wednesday, hitting a new all-time high above $100.

TGT Chart

Target Stock Performance, data by YCharts.

Margin expansion continues

Target faced a tough year-over-year sales comparison in the second quarter, as comparable sales surged 6.5% in the prior-year period. As a result, the company's comp-sales growth slowed to 3.4% last quarter, driven by a 2.4% increase in comparable traffic. Still, this means that Target has increased comparable-store sales by roughly 10% over the past two years, as management proudly noted.

Digital sales continued to be a key driver of Target's growth, rising 34% year over year in the quarter. Meanwhile, comparable sales in the retailer's physical stores grew 1.5%. Total revenue increased 3.6%, to $18.4 billion.

In the first quarter of the year, gross margin declined modestly, but Target was able to more than offset this margin pressure with expense savings. The savings continued last quarter, as operating expenses rose just 1.2%, significantly slower than the company's revenue growth.

Moreover, Target expanded its gross margin to 30.6% from 30.3% a year earlier -- the first year-over-year increase in nearly three years. CFO Cathy Smith stated, "This performance reflected the ongoing work of our merchant teams to optimize assortment, cost, pricing and promotions across all of our categories."

The exterior of a Target store

Target achieved its first gross margin increase in several years during Q2. Image source: Target.

The combination of excellent cost control and stronger gross margin caused Target's operating margin to widen to 7.2% last quarter, compared to 6.4% in the second quarter of fiscal 2018. Operating income rose 17%, to $1.32 billion, and adjusted EPS climbed 24%, to a record $1.82. This blew past the company's EPS guidance range of $1.52 to $1.72, as well as the average analyst estimate of $1.62.

Strength in essentials and discretionary items

Target's sales growth last quarter was driven by particularly strong performances in the apparel and essentials categories, both of which achieved comp-sales gains exceeding 5%. The growth in apparel was particularly impressive, as many apparel-centric retailers have struggled with weak sales year to date.

A strong merchandise assortment and compelling price points certainly contributed to Target's market-share gains in apparel. But the retailer's success here also highlights the power of its business model of selling a broad selection of everyday items along with desirable discretionary goods. The everyday items drive consistent traffic to Target's stores, where the retailer has a chance to capture impulse purchases, as long as it offers compelling merchandise.

Target appears to be doubling down on this strategy. Earlier this week, the company announced a major upgrade to its food and beverage selection, as it will launch a new house brand called Good and Gather next month. It will include more than 2,000 products by the end of 2020. If this brand launch is successful, it could pay dividends well beyond the food and beverage aisles.

Guidance is solid

For the third and fourth quarters, Target expects comp-sales growth roughly in line with the 3.4% increase it posted in Q2. The company does expect its profit growth to slow or stop this quarter, with EPS coming in between $1.04 and $1.24, compared to adjusted EPS of $1.09 in the prior-year period. That said, Target has beaten its earnings forecasts for each of the first two quarters of fiscal 2019.

Furthermore, Target raised its full-year EPS guidance by $0.15, to a new range of $5.90 to $6.20. That would be up 9% to 15% year over year. With the discount retailer continuing to report solid sales growth and its profit margin finally starting to expand again, it's easy to see why investors are falling back in love with Target stock.