Analysts are predicting that there is no end in sight to the decline in gross margin on the iPhone. Bernstein Research analysts (via Business Insider) are predicting that it will fall below 40% for the first time next year, and fall again to 39% in 2018. Other analysts agree.

A chart put together by the firm shows iPhone margins falling from 57.7% in 2009 to 40.8% this year, arguing that the costs of making next year’s iPhone and difficulty in charging more for it in a much more competitive environment will see it fall further over the next couple of years.

Morgan Stanley’s Katy Huberty, says that, ironically, the popularity of the iPhone 7 may have contributed to pressure on margins …

Huberty says that Apple appears to have underestimated demand for the iPhone 7, and had to boost orders, which adds to production costs.

10-K data suggests Apple underestimated demand creating a near- term margin headwind as supply ramps. We also see this as a sign Apple approached iPhone 7 forecasts with conservatism. Given better than expected initial demand, Apple has increased orders to suppliers and is incurring expenses to ramp additional production lines, which is creating a headwind in December.

UBS analysts Steven Milunovich and Benjamin Wilson agree with Bernstein that Apple is likely to face increased production costs next year without the ability to raise prices. Indeed, they think the price gap between the two sizes may need to decrease.

Depending on price increases, larger screens could increase ASPs. However, margins might decline if build cost increases outstrip higher prices. Apple could end up selling Plus phones at closer to regular size prices.

Finally, analysts also appear to agree that Apple is not setting aside enough money to cover the costs of warranty repairs. Once the true costs are factored in, they suggest, that will further reduce the gross margin. A recent Wells Fargo’s Maynard Um note commented on this, echoing comments made by Bernstein.

We believe accrual levels are still too low relative to claims and expect an increase in FQ1, which we think may limit upside potential to gross margin from warranties. On a rolling 24-month basis, claims per unit have been relatively steady, while accruals per unit have decreased, which suggests, to us, a greater likelihood of increased to accruals.

It’s notable that Apple has recently launched two new repair programs in quick succession, one for unexpected shutdowns in the iPhone 6s, the other for ‘touch disease‘ in the iPhone 6 Plus. However, neither program is likely to have a major impact, the 6s issue reportedly limited to a very small number of phones, and Apple charging for 6s Plus repairs on the basis that the problem results from impact damage.

For context, it should be noted that most companies would kill for margins of 39%. Apple takes home almost all the profit in the smartphone industry.

You can follow iPhoneFirmware.com on Twitter or join our Facebook page to keep yourself updated on all the latest from Apple and the Web.