Fitbit Inc. gave investors some much-needed good news, reporting revenue that beat projections and suggesting it’s finally making progress in its transformation from a maker of step-counting gadgets to essential health-monitoring tools.

The hardware maker’s profitability has sagged while it confronts a maturing market and falling sales. Fitbit shares have lost more than half of their value over the past year, as investors lost patience that upcoming products would resuscitate demand. The company reported earnings that came in well-below analyst expectations the past two quarters and cut staff earlier this year to reduce operating costs.

Sales fell 41 percent to $298.9 million in the quarter ended March 31, Fitbit said Wednesday in a statement. Analysts on average estimated $279.4 million, according to data compiled by Bloomberg. The company said it lost 15 cents a share, excluding some costs, compared with analysts’ projection of a loss of 18 cents a share.

Fitbit’s share gained 9.3 percent in extended trading at 4:28 p.m. in New York after closing at $5.68.

Exclusive insights on technology around the world.

Get Fully Charged, from Bloomberg Technology.

Chief Executive Officer James Park has been trying to prove to investors that he can transform Fitbit into a digital-health company that relies less on consumers and more on the health-care industry. The company continues to increase its corporate program and earlier this year it unveiled an alliance with the UnitedHealthcare Motion wellness program that lets participants use Fitbit’s Charge 2 fitness tracker.

Though the company has hung on as the market leader for fitness bands, it faces competition from lower-cost makers and smartwatches from Apple and Samsung Electronics Co. Fitbit’s long-term growth depends on its ability to diversify into new product categories and software offerings.

Fitbit is “focused on positioning the company for the next stage of growth with wearables and connected health,” Park said in the statement.

The company forecast sales in the current period of $330 million to $350 million, compared with estimates of $350.1 million.

Expectations were low for the first part of the year, considering the market for activity trackers is shrinking and Fitbit planned no major new products, said Charlie Anderson, an analyst at Dougherty & Co. In the smartwatch category, Anderson said he expects Fitbit’s growth will be tempered by competition from the Apple’s product and the scores of Android watches.

“The good things are its loyal user base, but the bad thing is that it’s hard to get confidence that it’ll bring features to the table that aren’t already in the market,” Anderson said.