Seagate Technology (NASDAQ:STX) shares have been soaring after the company reported strong fiscal second quarter results that beat Wall Street estimates by a huge margin. The company is benefiting from a price recovery in the memory market that started in the second half of 2016 and an improved product mix in the form of higher enterprise sales. These two factors allowed Seagate to trump the consensus earnings estimate by an impressive $0.30 per share.

The earnings beat seems to have emboldened the company as management has raised its earnings guidance for calendar year 2017 from $2.50 to $4.50 per share. This major bump is not surprising since higher storage demand and a price recovery will act as catalysts for growth.

Capacity cuts and higher prices are powering Seagate margins

Seagate's average selling price is gradually gaining momentum as the oversupply in the industry comes down. Over the past three quarters, the average selling price of each hard-disk drive, or HDD, has increased 10% or more from previous lows.

Chart showing the increase in Seagate's average selling price of HDDs.

Data from Seagate Technology. Chart by author.

The recent rise in HDD prices can be attributed to manufacturing capacity cuts at Seagate that have led to reduced supply. A tighter supply of DRAM and NAND memory has also contributed to higher memory prices. Seagate had announced last year that it would cut its manufacturing capacity by approximately 35% to a range of 35 million to 40 million drives each quarter.

As a part of this initiative, the company announced earlier this month that it will shutter its HDD manufacturing operations in Suzhou, China, laying off around 2,200 employees. This move is in line with the trends seen in the storage industry overall, as storage capacity per hard drive is increasing.

Chart showing the growth in Seagate's storage shipments and average capacity.

Image source: Seagate Technology.

Higher capacity per drive means that Seagate now needs to manufacture a smaller number of them to meet the same demands for storage. To add some perspective, Seagate shipped just under 40 million HDD units last quarter as compared to 46 million units in the prior-year period. However, it actually shipped 12.5% more exabytes during that same period, as you can see in the chart above.

This is why Seagate is aggressively lowering its manufacturing footprint to improve the utilization rate of its factories. The reductions have allowed the company to lower manufacturing costs by $200 million, while also enjoying $300 million in savings on operating costs in calendar year 2016.

The impact of these cost reductions is clearly visible on Seagate's gross and operating margins over the past four quarters:

Chart plotting the rise in Seagate's profit margins.

Data from Seagate Technology. Chart by author.

And this uptrend should see continued momentum -- Seagate's cost basis will decline further as it consolidates its manufacturing operations. Meanwhile, the company should also witness a gradual improvement in the top line due to higher sales from the enterprise segment.

A boost from the enterprise business

With PCs going out of fashion, Seagate has shored up its enterprise business by growing sales of storage products to data centers and servers that need to store data in bulk. Last quarter, enterprise revenue was 37% of the top line, as compared to 34% in the prior-year quarter and 32% the year before.

Seagate will continue enjoying gains in this segment as increasing data consumption leads to growing storage needs in data centers. A forecast by Research and Markets suggests that the global data center storage market will grow at an annual rate of 15% until 2020. Network-attached storage, or NAS, will be one of the key drivers of this growth, and Seagate is working hard to tap this segment by launching new products.

Small businesses are increasingly using NAS for their IT needs since it is like setting up a private cloud in an office where data can be stored in a centralized location. When the need to scale up arises, NAS allows a business to quickly deploy additional storage without incurring major incremental costs. The flexibility of deploying a NAS means that this segment will clock an annual growth rate of almost 26% until 2019, according to Research and Markets, outpacing the overall data center storage market.

The company currently offers three variants of NAS devices that can be scaled from as low as two terabytes to as much as 30. The three configurations are 2-Bay, 4-Bay, and 6-Bay with the number of bays referring to the number of hard drives that can be configured into one NAS.

Overall, Seagate has done well mitigating the drop in PC sales by focusing on higher-margin opportunities and scaling back manufacturing. It is tapping the growth in the storage market by shifting toward the enterprise segment where the majority of the growth is going to take place in coming years. This should present Seagate with sustainable opportunities in the storage industry.

Harsh Chauhan has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.