Last quarter, Apple (NASDAQ:AAPL) reported that its gross profit margin ticked down from 38.9% of revenue a year ago to 38.3% of revenue. The year-over-year change wasn't huge and since Apple's revenue grew substantially from a year ago, its total gross profit -- that's revenue less cost of goods sold -- grew by nearly $3 billion year over year. The tech titan is still extremely profitable.

That said, investors should aim to understand what drives key aspects of a company's business, so to that end, let's explore what drove Apple's gross profit margin percentage down year over year and what, if any, long-term implications there could be from that decline.

An Apple iPad.

Image source: Apple.

Higher product cost structures

Apple said in its quarterly filing that the main reason its gross profit margin percentage declined year over year was that it saw higher product cost structures. Now, higher product cost structures in themselves don't mean that gross profit margin percentage goes down, but higher product cost structures relative to their selling prices do.

As a hypothetical example, let's suppose I run a smartphone company that sells one kind of smartphone for $500 each. If each smartphone costs me $350 to manufacture, then my gross profit per device is $150 and my gross profit margin percentage per device sold is 30%.

Now, let's say that I start selling smartphones that cost me $500 to manufacture. If I price the phones at $650, then my gross profit margin percentage per device is still 30% even though my product cost structure is up.

What happened here is that even though Apple has reported significant average selling price growth in its iPhone business (its largest business by revenue and the main driver of gross margin), its cost structure growth as a percentage of the device selling price was greater. This means that on a percentage basis, its products were less profitable last quarter than they were in the prior year (though in absolute dollar terms, Apple generated more gross profit last quarter than it did in the year-ago quarter).

Better services margin and foreign exchange tailwind

Apple says that the impact of higher product cost structures on its gross profit margin percentage were "partially offset by a favorable shift in mix of products and Services." On top of that, Apple explained that the "strength in foreign currencies relative to the U.S. dollar had a favorable impact on gross profit margin percentage."

I'll explain both of these.

The "favorable shift in mix of products" simply means that Apple sold more of its higher-margin products last quarter than it did a year ago. So, for example, if Apple sold more of its iPhones with higher storage capacities this year than it did a year ago, then that would likely have led to a positive impact on gross profit margin.

We can apply this argument to Apple's services business, too. Apple doesn't go into detail about the relative margin structures of its various services, but it's generally believed that Apple's AppleCare and App Store sales tend to be more profitable than, say, its Apple Music business. So, Apple's higher-margin services becoming a larger percentage of its overall services revenue than the lower-margin ones helped to boost services gross profit margin and help to offset the bad news on the product cost structure front.

Finally, Apple mentioned foreign exchange tailwinds. The way this works is simple: Apple recognizes its revenue in dollars, but in countries outside of the U.S., the company needs to price its products based on local currencies. An Apple customer in China, for example, isn't going to buy an iPhone with dollars, but with yuan.

Apple has to take those local currencies and exchange them for U.S. dollars, so when foreign currencies are strong relative to the U.S., those foreign sales translate into more dollars than they do when they're weak against the dollar.

Here's an example. A 64 GB iPhone X costs 8,316 yuan in China and the current exchange rate between the U.S. dollar and the yuan is 6.35 yuan to $1. When Apple sells an iPhone X in China for 8,316 yuan, it gets converted into $1,309. Now, if the ,uan were stronger relative to the U.S. dollar -- say, 6 yuan for each $1 -- then that same 8,316 yuan iPhone X would yield $1,386 dollars to Apple. This would boost Apple's gross profit margin on the device.

It's not hard to see why, then, Apple benefits when foreign currencies are stronger relative to the dollar and is negatively impacted by a strong U.S. dollar, especially since well over half of Apple's revenue comes from outside of the United States.

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.