Cargo airplanes are constrained not just by the amount of volume they can squeeze into their cargo holds, but also by the amount of weight they can lift into the air.

So the question of how many iPhones can fit into a full 747 freighter is not just interesting for Apple fans, but also provides a great opportunity to illustrate the dual-optimization problem at the core of air freight forwarding.

We can assume the iPhone is shipped by air from China to overseas markets, because the cost of capital of leaving a full container of 60,000 iPhones at sea for over a month would far outweigh the extra price of shipping them by air.

At the scale Apple is operating, they almost certainly charter full 747 freighters, rather than moving phones in the bellies of passenger flights. And anyway, because of the risks posed to airplanes posed by lithium ion batteries and magnetic properties of the iPhone, it’s unlikely the airlines let them fly huge quantities on passenger planes.

The iPhone 6 weighs in at 385 grams including packaging, which measures 15.5 cm x 9 cm x 6 cm. A full 747-8 freighter can carry 135 metric tons of freight or up to 600 cubic meters of cargo, whichever constraint gets hit first.

We haven’t gotten our hands on the iPhone’s master carton–the box full of boxes–that the phones travel in, so we don’t know its dimensions. So we’ll just assume that there is about 5% wastage between the metaboxes and general packing inefficiency. If it was any company besides Apple I’d probably say 10% inefficiency, but they are pretty much the best at everything they do.

Given the packaging dimensions and our assumption of 5% wasted space, we estimate that 600,000 iPhones could fit into a full 747 freighter, which would weigh 231 metrics tons.

The 747-8 freighter only has a lift capacity of 135 metric tons, so that weight constraint means the the planes could in theory carry as many as 350,000 phones. But at that level, the phones would only fill up 58% of the space in the cargo hold, representing a tremendous lost opportunity.

The way airlines solve this problem is simple, and it’s also the key to making money in the air freight business. The airlines would put, say, 200,000 phones on the plane, which would weigh 77 metric tons, or 58% of the plane’s lift capacity. And the plane would still have 66% of the space in the cargo hold free, so now the airline just needs to go find another company who has some very light but voluminous cargo to fill up the hold.

Airlines consolidate heavy freight with light freight to get the ideal mix that lets them charge the companies with heavy goods by weight and the companies with light freight by volume. The result is called “free margin,” and is one of the best kept secrets in the air cargo industry.