SeongJoon Cho/Bloomberg via Getty Images(NEW YORK) -- Apple stock took a hit after its first-quarter earnings were released on Wednesday afternoon, topping profit forecast but with lower-than-expected iPhone sales.

Shares of Apple (Nasdaq: AAPL) fell more than five percent in after-hours trading. Apple stock was up 1.86 percent to $514.17 at the close of trading in New York.

The company reported that it sold 47.8 million iPhones in the quarter, compared with 37 million in the same quarter a year ago. Many investors had hoped that the company would sell 50 million iPhones, which drives Apple's earnings.

Investors eagerly awaited Apple to report its earnings, seeking clarity after a number of rumors about iPhone parts and sales.

Earlier this week there were reports about the next iPhone being released in June.

"Certainly a new product line is in the works," said Brian Colello, Morningstar senior equity analyst. "It remains to be seen what Apple will ultimately come out with and when. Those are certainly factors to keep an eye on."

Last week, a report that Apple had decreased its order for iPhone parts may have contributed to a decrease in its stock price to near $500.

"It will be interesting to see if Apple is really pushing the envelope in terms of innovation and shortening the product cycle," Colello said.

Colello said Apple is facing growing competition from Samsung. Last summer, when Apple released the iPhone 4S, Samsung also released its Galaxy S III, which saw strong sales.

On Wednesday, Apple Inc., based in Cupertino, Calif., said it sold a "record" 22.9 million iPads in the quarter, compared to 15.4 million a year ago. The company also sold 34.1 million Mac computers, compared to 5.2 million in the same quarter last year.

The company failed to beat expectations about revenue, but it did beat forecasts for profit. Apple's own forecast was $52 billion in revenue.

"We're thrilled with record revenue of over $54 billion and sales of over 75 million iOS devices in a single quarter," said Apple CEO Tim Cook in a statement. "We're very confident in our product pipeline as we continue to focus on innovation and making the best products in the world."

The company still can boast about the amount of cash it has hoarded: $137 billion.

On Tuesday, some investors had their hopes up after Verizon reported a stronger-than-expected number of new iPhone subscribers during its conference call.

Colello, the Morningstar senior equity analyst, cautioned that Verizon's iPhone sales were strong but they also sold a large number of older iPhone models.

"Obviously the iPhone is the biggest driver, but there are a couple factors in there, such as the types of units and at what prices," Colello said. "Was it the Phone 5 or 4S?"