It's now been over a decade since Amazon.com (NASDAQ:AMZN) first announced its Prime membership program to investors. Initially, skeptics balked at the idea of Amazon offering a year's worth of fast, free shipping for just $79 per year. It just sounded insane. And rightfully so because the value to the average consumer is readily apparent. It doesn't take many orders for a Prime membership to pay for itself in shipping savings. Even last year's price increase to $99 is a no-brainer.

Of course, the whole idea here is that Prime members will start buying even more stuff from the Everything Store. But the flip side of that equation is Amazon is then on the hook for even more in shipping costs. Have you ever wondered how it pays for all that Prime shipping?

Fulfillment by Amazon

Amazon's unrivaled network of warehouses and fulfillment centers is easily one of its biggest advantages, since this is precisely what facilitates free two-day shipping. Well, that and an army of robots that help process all those orders. After acquiring Kiva Systems for $775 million in 2012, Amazon says it now has 30,000 of these amazing automatons in place at its warehouses.

As hard as Wal-Mart (NYSE:WMT) might try, it has a long way to go before it can truly be a viable e-commerce competitor. Wal-Mart is planning its own membership-based strategy to offer free shipping to customers, and while it also has a network of warehouses, shipping orders to customers at a scale that can compete with Amazon is no easy task.

You know how when you're poking around on Amazon.com for a new pair of socks, and you see that little "Fulfilled by Amazon" indicator? This is the key to the economics of Amazon's Prime strategy. It's not just the $99 annual membership fee that Amazon collects, but also what it takes on the back end from merchants.

Amazon charges merchants a plethora of fees to participate in FBA. This includes for things like order handling, packing, and weight handling. One of the more meaningful fees, though, is for monthly inventory storage, which Amazon charges by cubic feet. These fees also factor in seasonality and product size, with rates going up for the holiday shopping season.

Month Standard Size Oversize January-September $0.51 per cubic foot $0.40 per cubic foot October-December $0.68 per cubic foot $0.53 per cubic foot

The long-term inventory storage rates are even higher, which apply to inventory that have been on the shelves for six to 12 months (or longer). Twice a year, Amazon conducts inventory cleanups and assesses these fees.

Inventory Cleanup Dates Affected Inventory Long-Term Storage Fee August 15 February 15 Units in fulfillment centers six to 12 months $11.25 per cubic foot August 15 February 15 Units in fulfillment centers 365 days or longer $22.50 per cubic foot

As of December 2014, Amazon had nearly 103 million square feet (not cubic feet) of total fulfillment and data center space that it either owned or leased globally.

Oh, and if a merchant wants its inventory returned or disposed of? There are fees for that, too, based on how many units we're talking about.

Order away

Put another way, Amazon rents out its warehouse space and charges merchants for fulfillment services and inventory management, but in return, merchants know that Prime members spend a lot more and highly prefer to buy products that are eligible for Prime shipping. That's what they pay for on their end, after all. Amazon also justifies earning these fees by providing support and service, plus merchants can even use FBA for orders placed outside of Amazon.com.

How else do you think Amazon can absorb the expedited shipping on aforementioned six-pack of socks that only costs $7?

All of this being said, Amazon still incurs net shipping costs, which typically hover around 5% of net sales. The company discloses its total shipping revenue and total shipping costs.

The FBA fees that relate to shipping are included in shipping revenue, as is a portion of Prime membership fees. For example, last quarter's shipping revenue was $1.5 billion, which wasn't quite enough to offset the $2.7 billion in shipping costs, which all net out to $1.2 billion in shipping expenses.

As if there were ever any doubt as to Prime's value proposition, the fact that Amazon still loses hundreds of millions of dollars per quarter on shipping should assuage any consumer concerns. And we haven't even talked about Prime's handful of other benefits. Go ahead, order that pair of socks. It'll be on your doorstep in a couple of days.