• Fitbit reported better-than-expected results Wednesday.
  • Co-founder and CEO James Park said the company saw better sales amid stronger demand.
  • He also said the company is on track to release a smartwatch before the holiday season.

Fitbit reported quarterly results and revenue that beat analysts' expectations on Wednesday.

Here's how the company did compared with what Wall Street expected:

  • Loss per share: 8 cents vs. 15 cents expected, according to Thomson Reuters
  • Revenue: $353.3 million vs. $341.6 million expected, according to Thomson Reuters

In the year-ago period, Fitbit reported earnings of 12 cents a share on revenue of $586.5 million.

The company said it sold 3.4 million devices during the quarter, about in line with the 3.47 million that analysts had expected, according to a StreetAccount consensus estimate.

The stock initially gained more than 8 percent in after-hours trading. The stock pared some of its early gains, but was last still trading more than 4 percent higher.

Co-founder and CEO James Park said better-than-expected demand led to higher sales and inventory reduction.

"Our smartwatch, which we believe will deliver the best health and fitness experience in the category, is on track for delivery ahead of the holiday season and will drive a strong second half of the year," Park said in a statement.

In order to keep pace with competitors such as Apple, Fitbit's research and development team is exploring the medical sector. The company said it is working on tools to help diagnose and monitor sleep apnea.

The stock has fallen 62 percent in the past year amid slowing sales. Shares of Fitbit hit a 52-week intraday low of $4.90 on June 22.

This is breaking news. Please check back for updates.

WATCH: Fitbit Alta gets good reviews