Office supply company Staples (SPLS) beat analyst estimates when it reported its second-quarter earnings Wednesday morning, with weak performance at its retail stores being partially offset by growth in both its commercial and online segments. While Staples still has plenty of work to do to combat falling margins, the company is performing far better than rival Office Depot, and its second-quarter results show significant progress in a few key areas.

Earnings rundown

Staples managed to beat analyst estimates for both revenue and EPS during the second quarter:

Metric 

Average Analyst Estimate

Actual Result

EPS

$0.11

$0.12

Revenue

$5.16 billion

$5.22 billion 

Total sales fell by 1.8% year over year, to $5.2 billion, an improvement over the 2.8% decline during the first quarter. Operating income collapsed, but backing out the effects of various one-time charges, Staples produced $120 million in operating income, a 2.3% operating margin. This is down from 3.5% during the second quarter of 2013.

Comparable-store sales declined by 5%, an acceleration from the 4% decline during the first quarter and  worse than the 3% decline reported by competitor Office Depot during its second quarter. Staples closed 80 stores during the quarter as part of its plan to close 140 this year.

While the retail operation performed poorly, online sales on Staples.com jumped by 8% year over year, an improvement over the 6% growth during the first quarter. This has been driven by Staples expanding its product assortment beyond core office supplies, although the online channel tends to carry lower margins.

The North American commercial business, through which Staples sells directly to businesses, grew by 2.6% during the quarter, with operating margin from the segment staying roughly steady at 6.5%. The commercial segment includes two websites targeting different business customers: Staples Advantage for organizations of 20 or more employees, and Quill.com for smaller businesses.  Commercial has been a bright spot for Staples as its stores have underperformed, and the second quarter marks an acceleration over the 0.7% growth during the first quarter. In contrast, Office Depot's business solutions segment declined by 1% during the second quarter, producing an operating margin of just 4%.

The international division declined by 3.9% year over year, with the company recording an operating loss of $25 million for the segment. International operations made up about 18.5% of total sales during the quarter, so while the division is the least important for Staples, the constant operating losses are a drain on the company's profits.

Priorities are in the right place

Staples is mostly a business-oriented company, with about 80% of its sales going to businesses of all sizes, either through its retail stores, its commercial business, or its website. While the retail stores are performing poorly, the other parts of Staples' business are doing fine, and the strength of the commercial segment suggests that businesses still see value in doing business with Staples.

Staples plans to close a total of about 225 stores over the next couple of years. Along with roughly 400 store closings expected from Office Depot, this reduction in store count should lead to better profitability for existing stores as sales are consolidated. This will take time, and the retail operation has so far only gotten worse, but it's still a profitable business for Staples. The same can't be said for Office Depot, which posted an operating loss of $6 million for its retail division during the second quarter.

The focus on online sales also gives Staples a key advantage over Office Depot. While Staples derives about 50% of its revenue from online sales, either through Staples.com or its commercial segment, Office Depot doesn't even mention the online channel in its earnings report. As the office supply industry evolves, a strong e-commerce operation is becoming critical in competing against online-only rivals like Amazon.com, as well as other big-box stores like Wal-Mart

Final thoughts

While comparable-store sales collapsed during the quarter for Staples, the all-important commercial segment grew faster than it did during the first quarter, and online sales surged. The retail stores need work, but store closings over the next couple of years should act to boost margins. Staples' results were better than expected, and with the company still expecting to produce $600 million in free cash flow during the year, the company is doing a lot better than its floundering stock price suggests.