The price of arabica coffee -- the bean used by Starbucks (SBUX 2.09%), Green Mountain Coffee Roasters (GMCR.DL), and most other coffee retailers to make coffee -- is shooting through the roof. After trading as low as $1 per pound in November, the arabica price has since spiked to $1.50 per pound, and some analysts say it could go as high as $2 per pound in the months ahead.

The price spike was caused by speculators who reacted to a prolonged drought in Brazil. The hot and dry weather could not have come at a worse time; the beans are still in the crucial early stages of development. Moreover, Brazil is responsible for one-third of the world's coffee production. Significant production losses in Brazil could cause the arabica supply to fall short of demand.

Effects of high arabica price
This is not the first time that coffee prices have suddenly spiked. In 2011, arabica futures spiked to a high of $2.82 per pound, causing coffee brewers to pay more for coffee beans. Starbucks incurred $200 million in additional costs in 2011 and again in 2012 as a result of elevated prices. Starbucks was able to offset most of the cost increase through cost-cutting elsewhere, but Green Mountain was unable to maintain its margin after the price spike; its gross margin declined 1.5 percentage points even after the company enacted price increases.

The recent price spike has the potential to reduce the companies' profitability once again. Starbucks buys more than 500 million pounds of coffee beans each year, while Green Mountain bought 216 million pounds in 2013. A 50% increase in coffee costs would cause a $250 million and $108 million cost increase for Starbucks and Green Mountain, respectively.

However, it is not that simple. Both companies purchase coffee many months in advance through a combination of fixed-price and variable-price contracts. Starbucks and Green Mountain have already purchased their entire coffee supply for fiscal 2014 and part of 2015 . As a result, any increase in coffee costs will not take effect until 2015 at the earliest.

Moreover, Starbucks and Green Mountain spread out their coffee purchases throughout the year, so today's elevated price may account for only a tiny sliver of the companies' total coffee costs. In order to have a substantial negative impact, the arabica price would have to remain elevated throughout the year like it did in 2011.

How bad could it get for Starbucks and Green Mountain?
Unfortunately, some analysts do believe that the price could go even higher -- to $2 per pound -- if Brazil does not experience rain soon. Still, even in a $2-per-pound environment -- where prices stay elevated for an entire year's worth of coffee purchases -- Starbucks and Green Mountain will make it out OK.

At $2 per pound, Starbucks would pay $1 billion for a year's worth of coffee. At the end of fiscal 2012, Starbucks' total coffee purchase commitments were about $850 million. At that time, the company had purchased only a small portion of its coffee supply for fiscal 2014, meaning the vast majority of purchase commitments related to coffee used in fiscal 2013. If we assume 85% of the purchase commitments related to fiscal 2013, then Starbucks' coffee costs were roughly $723 million in fiscal 2013. Starbucks' fiscal 2013 gross margin was 57%. If you add another $277 million to cost of goods sold -- so that coffee costs would be $1 billion -- it lowers the gross margin just two percentage points, to 55%.

In a worst-case scenario -- and absent any other cost-cutting or price offsets -- Starbucks' gross margin would fall just 2 percentage points if it had to pay $2 per pound for a years' supply of coffee.

Green Mountain does not provide enough information to do a similar calculation, but the result would likely be similarly benign. If you recall, its gross margin dipped 1.5 percentage points after coffee prices spiked as high as $2.82 per pound. Not that bad, all things considered.

Foolish takeaway
If the price of arabica coffee continues to increase, do not dump your holdings in Starbucks and Green Mountain. In reality, coffee beans are only a small part of the many components that make up the price of these companies' products. Investors' focus should be on the long-term supply of coffee beans and whether or not Starbucks and Green Mountain can forge strong relationships with suppliers. So far, it looks like they are set on both fronts.