When Facebook (META 1.98%) reported earnings in October, the big overhang that overshadowed an otherwise strong quarter was a forecast for substantial cost increases in 2015. Shares fell 6% the following days on fears related to that guidance.

For a company in growth mode, investing in the future is of the utmost importance. That's why investors shouldn't fret about Facebook spending big next year, as it will pay off over time.

Digging into the numbers
Prior to closing the WhatsApp acquisition, Facebook had been expecting total costs in 2014 to rise fro 30% to 35% compared to 2013 levels. For context, total costs and expenses in 2013 were $5.1 billion, so the initial guidance suggested that 2014 costs would come in between approximately $6.6 billion and $6.8 billion.

After the WhatsApp deal closed, Facebook adjusted its 2014 outlook to factor in stock-based compensation and amortization of intangibles, saying 2014 costs should increase 45% to 50%. That puts 2014 cost guidance at $7.5 billion at the midpoint. Facebook has incurred $4.8 billion in total costs and expenses during the first three quarters of the year.

Facebook expects 2015 total costs and expenses to soar another 55% to 75% from 2014 levels, planning on it being a "significant investment year." Using the 2014 midpoint, the forecast suggests that 2015 spending could be as high as $13.1 billion. Even on the low end, we're talking about $11.6 billion. That's admittedly a wide range, but the estimates are very preliminary.

That's a pretty major increase in only two years, but it will be money well spent.

Hey, big spender
There are several areas where Facebook is planning on spending all that money. First off, the social network is actively growing its talent base, and that entails stock-based compensation to attract and retain the best talent in Silicon Valley. Facebook will also invest in expanding the reach of existing products, helping advertisers navigate the shift to mobile while improving relevance and targeting.

COO Sheryl Sandberg also noted that Facebook is investing heavily in the technology driving its ad platform, such as its Audience Network and LiveRail. In July, Facebook acquired LiveRail, a video ad tech start-up, for an estimated $400 million to $500 million to jump start Facebook's video ad ambitions. Facebook just introduced autoplay video for mobile app-install ads this week.

Ensuring smooth video delivery also entails beefing up network infrastructure. Most people don't associate Facebook with hardware in any meaningful way, but that's because the company's hardware products are all behind the scenes. Facebook designs and engineers its data centers from scratch in order to achieve maximum efficiency. The company then shares these designs through its Open Compute project.

"Second to none"
Facebook VP of Infrastructure Jason Taylor spoke at a Credit Suisse tech conference earlier this week, sharing some interesting statistics and technical details about Facebook's data centers.

Users upload a whopping 930 million photos to Facebook every single day, and the site also processes 6 billion likes and 12 billion messages. That's a lot of content to distribute and Taylor says that efficiency has been Facebook's top priority for the past five years as the service scaled to critical mass. The company smartly recognized early on that it would need to expand capacity in the most efficient way possible, which in turn facilitates long-term financial viability.

For instance, heat management is one of the most important areas in data center design. A poorly designed data center might face 50% to 90% higher electricity bills compared to one that is designed well. Facebook's data centers don't spend energy chilling air like other data centers; Facebook pulls in cold air from outside, uses it to cool the servers, and then it flows out of the other side. According to Taylor, "So in terms of raw thermal efficiency, our data centers are second to none."

Facebook also uses homogeneous servers in order to similarly reap the efficiency benefits in maintenance, serviceability, and supply chain optimization. Given this intense focus on efficiency, investors can rest easy knowing that Facebook is absolutely getting its bang for its buck with infrastructure investments.

What to expect when you're expecting major cost increases
While Facebook gave a preliminary view on its 2015 costs and expenses, it did not offer any revenue guidance. Of course, the underlying fear whenever you talk about cost increases is the subsequent margin compression, and Facebook declined to shed any light on how much profitability may suffer in 2015.

The Street is modeling for $17 billion in revenue next year. The implied midpoint of 2015 cost guidance is $12.3 billion. That would translate into approximately $4.7 billion in operating income, or a 27% operating margin. While respectable, that does represent notable contraction from the 36% operating margin that Facebook put up in 2013, and it's a massive drop compared to the 45% operating margin that Facebook has enjoyed for the first three quarters of 2014.

Ultimately, Facebook will need to prove that these 2015 investments can drive revenue growth in the long run. After the spending mitigates, operating leverage should kick in and margins should subsequently expand following the contraction.

Remember how swiftly Facebook transitioned to mobile after it started trying, promptly silencing early skeptics? Yeah, it's kind of like that.