Shares of Lowe's (LOW -0.04%) soared on Wednesday, rising nearly 10%. The stock's big move higher followed the home-improvement retailer's impressive second-quarter results. Strong profitability and an improved outlook for full-year financial performance have investors swooning.

Here's a close look at the key metrics in the quarter, highlighting the company's impressive momentum.

A person working on a do-it-yourself project at home.

Image source: Getty Images.

1. Earnings per share jumped

Helped by a slight year-over-year increase in revenue and margin expansion, earnings per share came in at $4.25. This was ahead of analysts' average estimate of $4 and up from $3.74 in the year-ago period.

Management said in the company's second-quarter earnings release that margin expansion was achieved through a "disciplined focus on driving productivity across the company."

2. Strong U.S. comparable-sales performance

Sales at U.S. stores open for at least a year decreased, but only by a small amount, considering the tough year-ago comparison the company was up against. U.S. comparable sales declined 2.2%.

This was an impressive gain, considering it's on top of U.S. comparable-sales growth of 35.1% in the year-ago quarter. As management pointed out, this means U.S. sales comps are up 32% on a two-year basis.

3. Robust Lowes.com performance

Lowe's said sales on its website increased 7% year over year -- on top of 135% growth last year.

4. Repurchasing billions of dollars worth of its own stock

The company loaded up on its own stock during the quarter, buying back 16.4 million shares for $3.1 billion. This aggressive repurchase shows the company's confidence in its stock's long-term performance.

The repurchase is a part of the company's capital-allocation program, which also includes dividends. Lowe's allocated $430 million to dividends during the quarter.

In total, Lowe's plans to repurchase $9 billion worth of its stock this year.

5. Optimistic guidance

Management lifted its full-year outlook for revenue. Previously, it was expecting revenue of $86 billion this year. Management now anticipates full-year revenue of $92 billion, translating to 30% comparable-sales growth on a two-year basis.

"Looking forward, I am confident in the positive outlook for our industry, and our ability to drive operating margin expansion and market share gains," said Lowe's chairman and CEO Marvin Ellison in the company's second-quarter earnings release.

Investors should be happy with the company's performance. It's particularly solid when viewed next to the stock's relatively conservative valuation.