Image source: Apple. 

Each year, IHS publishes its estimate of the bill of materials cost for the latest Apple (NASDAQ:AAPL) iPhone. This year, the research firm says the iPhone 7, with 32 gigabytes of on-board flash memory, costs the company about $220 to build.

Whenever these estimates come out, critics are quick to point out that Apple is making "obscene" or "ridiculous" profits from these devices. In response, individuals will point out that there is far more to the cost of building an iPhone than the sum of the components that go into the device. 

But while I agree that the per-unit manufacturing costs (referred to as "cost of goods sold") consist of more than just the raw components, I often see people include research and development expense as a component of the cost of goods sold for a particular iPhone.

That would be a mistake. 

The research and development question

Hardly anyone would argue that it costs Apple a pretty penny to design each iPhone. Apple develops a significant number of unique and proprietary technologies such as all of the software and services present on the device (not to mention all of the tools that Apple creates for app developers), custom chip technologies, the display, and much more. 

However, it's important to understand that these are one-time expenses, referred to as "non-recurring engineering", or NRE costs. In other words, Apple does all of the hard work and spends significantly to develop these technologies, but these expenses are incurred just once.

From an accounting perspective, research and development costs aren't generally counted under cost of goods sold and therefore, have no impact on gross profit margins (revenue less the manufacturing costs associated with the sale of a product). Instead, they're reported specifically as a separate line item -- still a critical component of a company's overall operating expenses.

Keeping operating expenses separate from costs of goods sold makes sense

From an accounting and reporting perspective, there is a good reason to keep R&D expenses separate from cost of goods sold. Remember that all of the expenses incurred to develop a product such as the iPhone happens well in advance of when the first unit rolls off the assembly lines. Furthermore, by the time an iPhone goes up for sale, Apple is already hard at work on the next several versions.  

So let's say that from an accounting perspective, Apple tries to include the R&D spending in the actual manufacturing cost of each iPhone it sells. Doing so would present significant challenges.

First of all, Apple would need to meticulously keep track of the spending associated with each project. Given that Apple is likely to be working at any time on multiple generations of products and technologies, this would indeed be very difficult.

Then, even if Apple's financial teams were able to accurately determine the spending on a per-product basis, how would the company report all of the spending that's happening in support of future projects? How does spending on products that never actually make it to market get accounted for?

It would be a complicated, untenable mess.

But wait -- there's more! When it comes to NRE expenses, any potential per-unit cost calculation would depend on the number of units shipped over the lifetime of the product -- higher unit shipments mean lower per-unit costs as the fixed cost is spread over a greater number of units. And the number of units shipped is impossible to know before the very last unit of a particular product line ships out to end customers.

For Apple, an iPhone model can remain on sale for years.

A better metric than gross profit margin

Gross profit margin is a useful metric. It provides insight into a company's manufacturing cost structure and, perhaps more importantly, a company's competitive positioning in its field, which is why it's usually worthwhile to compare the gross margins of companies in similar industries, not across different ones.

However, a better metric -- one that encompasses both gross profit margin as well as operating expenses -- is operating margin. This metric is calculated by taking gross profit, subtracting operating expenses, and dividing by total revenue.

Remember that even if a company has a good cost structure with respect to product manufacturing, it still needs to develop and market those products. If those product development and marketing expenses get out of hand, then all of the supply chain wizardry in the world will not be enough to sustain a healthy, profitable business.

When all is said and done, Apple's operating margin in the past fiscal year was just over 30%. What that means is that for every dollar the company brought in, $0.30 fell to the bottom line -- a respectable figure, especially since Apple operates in very competitive markets.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.