Lowe's shares plunged more than 11% Wednesday as higher costs weighed on its fiscal first-quarter earnings, which fell short of analysts' estimates and prompted the home improvement retailer to cut its forecast for the year.

Lowe's has been in a period of transition since CEO Marvin Ellison joined the retailer less than a year ago.The company is trying to improve its operations, but its investments are weighing on its profits. But the lower forecast clearly worried investors, prompting the sell-off.

Here's how the company did, compared with what Wall Street was expecting, according to Refinitiv consensus estimates:

Earnings per share: $1.22 adjusted, vs. $1.33 estimated

Revenue: $17.74 billion, vs. $17.66 billion estimated

Same store sales: up 3.5%, vs. up 3.2% estimated

"Our first quarter comparable sales performance is a clear indication that the consumer is healthy and our focus on retail fundamentals is gaining traction," Ellison said in a statement. "However, the unanticipated impact of the convergence of cost pressure, significant transition in our merchandising organization, and ineffective legacy pricing tools and processes led to gross margin contraction in the quarter which impacted earnings."

Lowe's said net income rose to $1.05 billion, or $1.31 per share, from $988 million, or $1.19 a share, a year earlier.

On an adjusted basis, Lowe's earned $1.22 per share, far below the $1.33 per share analysts polled by Refinitiv were predicting.

Ellison said profits were hurt by cost increases, which dinged its gross margins by 90 basis points and unprecedented levels of change in its merchandising operations.

"We are still in the early stages of our transformation, and with the changes we are putting in place, we expect to deliver improved gross margin performance over the balance of the year," said Ellison.

Revenue rose 2.2% to $17.74 billion, which topped analysts' estimates of $17.66 billion. Online sales rose 16% in the latest quarter, the company said.

Chuck Grom of Gordon Haskett Research Advisors applauded Lowe's for ramping its top line. Efforts to take market share in the home improvement space, while increasing productivity, explains the weaker margins, he said in a note to clients Wednesday.

For the first quarter, Lowe's same-store sales rose 3.5%, which was better than the estimate of 3.2%. Same-store sales growth in the U.S. was even higher, up 4.2%.

Chief Financial Officer David Denton said Lowe's overall same-store sales were down 4.1% in February, up 3.5% in March and up 7.2% in April. Domestically, Lowe's' same-store sales were down 0.9% in February, up 4% in March and up 8% in April.

"This is the first quarter in a while that Lowe's clearly out comped Home Depot," Oppenheimer's Brian Nagel told CNBC's "Squawk Box" on Wednesday.

Lowe's results come just a day after the leader in the space Home Depot reported better-than-expected first-quarter earnings. Strong results at Lowe's rival came despite the second wettest February weather in U.S. history and a deflation in lumber costs. Home Depot reaffirmed its fiscal 2019 guidance.

For fiscal 2019, Lowe's estimates total sales will rise 2%, while same-store sales are expected to increase 3%.

Lowe's expects net income for fiscal 2019 will be in the range of $5.54 to $5.74 per share. On an adjusted basis, it will earn between $5.45 and $5.65 per share.

Last quarter, Lowe's said it expected to earn $6 to $6.10 per share on revenue growth of about 2%. It predicted, at the time, that same-store sales would rise about 3% in fiscal 2019.

Despite the lower forecast and earnings miss, Nagel was upbeat about the results.

"I think when the dust clears on this, it's going to be a positive. The market's going to say Lowe's has been under-managed for a very long period of time. They figured out what they need to do, they're starting to see the results in better sales," Nagel said, adding that extra investment is needed in the near term.

As of Tuesday's market close, Lowe's market value was $88.4 billion, with shares up more than 20% this year. Shares of Home Depot, with a market cap of about $211.1 billion, are up more than 11% year to date.

Correction: The CEO of Lowe's is Marvin Ellison. A previous version misstated his name.