When Apple (AAPL -0.11%) reports fiscal third-quarter financial results on July 26, analysts are expecting a painful 25% year-over-year decline in the tech giant's earnings per share. This is a particularly steep decline in EPS considering analysts are anticipating a meaningfully more modest year-over-year decline in revenue of 15.3% during the same period. The bleak outlook for Apple's earnings highlights why the stock is trading at just 11.1 times earnings at the time of this writing.

Image source: The Motley Fool.

But what exactly is the key driver behind Apple's much lower EPS this quarter compared to the year-ago quarter? One major reason analysts are expecting EPS to fall faster than revenue is the company's contracting gross profit margin.

Apple's gross profit margin history

With the help of Apple's launch of iPhone 6 in Sept. 2014, the tech giant's gross profit margins began to improve significantly. Soaring iPhone sales and higher-priced iPhones benefited the company's gross profit margin. Largely driven by pent-up demand for iPhones with larger displays, iPhone sales jumped about 46% in the first full quarter of the iPhone 6 lineup's availability. As Apple's most profitable product segment, iPhone accounting for more of its total revenue meant its corporate gross profit margin received a nice boost. Furthermore, the new lineup boasted a higher-priced flagship iPhone option in its first "Plus" version, and Apple also introduced a third and more expensive storage tier with 128 GB. Together, more expensive purchase options drove the average selling price for iPhone higher in the upcoming quarters, and higher selling prices for Apple's iPhones also meant the company's gross profit margin increased, as its more expensive iPhone models boasted higher profit margins.

Between the fourth quarter of 2014 and the fourth quarter of 2015, Apple's gross profit margin increased from 37.5% to 40%.

Data for chart retrieved from Apple quarterly SEC filings. Asterisk indicates management guidance (midpoint of guidance range). Chart source: Author.

But now the same factors that were recently working for Apple's gross profit margin are now working against it. Apple's iPhone sales have turned downward and its average selling price is declining. In Apple's most recent quarter, iPhone unit sales declined 16% year over year, iPhone average selling price declined almost 3%, and the company's gross profit margin subsequently narrowed from 40.8% to 39.4%.

For Apple's third fiscal quarter of 2016, the continued trend of declining iPhone sales is expected to negatively impact the company's gross profit margin again. For Q3, management said it expects its gross profit margin to be between 37.5% and 38% -- down from 39.7% in the year-ago quarter.

As Apple's gross profit margin narrows, its leveraging the negative impact of Apple's falling revenue on the company's earnings, making net income and earnings per share fall more steeply.

It could get worse

In the near term, there's no quick solution to Apple's declining gross profit margin. Indeed, comparisons could get even worse going forward if the company keeps up with its new strategy of introducing lower-cost iPhones. In late March, Apple broke from its normal annual iPhone cycle and released its lowest-priced new iPhone ever: iPhone SE. With a starting price of $399, the smaller iPhone costs a whopping $250 less than the starting price of Apple's lowest-priced flagship iPhone 6s. If Apple continues to beef up its offerings at lower price points, this could begin to erode the company's gross profit margin even further.

Fortunately, Apple's conservative price-to-earnings ratio of 11.1 prices in current gross profit margin headwinds. But if this negative gross profit margin trend continues to erode profitability as fast as it has in recent quarters even into the iPhone 7 cycle, investors may have to rethink the company's ability to sustain current levels of profitability.