Lowe's reported second-quarter earnings and sales on Wednesday that fell short of analysts' expectations.

The home improvement retailer has also lowered its outlook for the full year, anticipating investing more in marketing and service for customers in stores, which will hurt margins.

The stock was last falling around 6 percent Wednesday afternoon on the news.

"The company ends the first half some way below where it expected to be," GlobalData Retail Managing Director Neil Saunders said in a note to clients. "Although compared to many retailers, Lowe's results are very positive, in the context of the home improvement market they are below par."

Here's what Lowe's reported compared to what Wall Street was expecting, based on a Thomson Reuters survey of analysts:

Earnings of $1.57 a share, adjusted, compared with a forecast profit of $1.61 per share.

Revenue was $19.50 billion versus an estimate of $19.53 billion.

Same-store sales climbed 4.5 percent, slightly better than the expected 4.3 percent growth.

"While our results were below our expectations in the first half of this year, the team remains focused on making the necessary investments to improve the customer experience and drive sales," CEO Robert Niblock said in a statement.

"We are pleased with our improved comparable sales performance relative to last quarter, and the strong momentum we built throughout the second quarter culminating in a 7.9% comparable sales increase for the month of July."