Source: Facebook/

If you're a Facebook (NASDAQ:FB) investor, you have to be happy with your return over the past year,. During that period, shares of the social-media giant have provided gains of nearly 20% versus the greater Nasdaq Composite's gain of 8% on the back of strong top-line growth versus last year's corresponding period.

Indeed, throughout the first half of 2015 Facebook's has grown revenue 40% greater than the first half of 2014, pulling in $7.6 billion versus $5.4 billion in the corresponding quarter. However, if you thought the additional revenue would tumble down the income statement and enrich investors, you'd be mostly wrong. Matter of fact, when it comes to both net income and EPS, Facebook actually produced less earnings than it did in 2014.

And if you're a shareholder, you should be happy Facebook's a less-profitable entity during this period.

Why are they less profitable is the question
While stock analysis can be inherently complicated, the basic premises are, well, quite basic. A company presumably makes a profit on a good or service and then determines what to do with that profit. A company can choose to invest in the business in a host of ways: Increased marketing and hiring more employees (more on this later) are a few ways a company can invest in future growth.

On the other hand, and just as important in the long run, the company can attempt to keep its expenses low to enrich shareholders via increased earnings. Of course, these are not mutually exclusive choices, and how a CEO manages expectations and spends money to grow the business or enrich investors is a part of that CEO's "grand vision."

For Facebook, it seems CEO Mark Zuckerberg decided to really shift to growing the business in 2015. See Facebook's appended income statement for insight into the transition [bolded text for emphasis]:

Facebook's Appended FinancialsH1 '15Percentage of RevenueH1 '14Percentage of Revenue
Revenue  $7,586 100%  $5,412 100%
Cost of revenue  $1,323 17%  $936 17%
Research and development  $2,231 29%  $947 17%
Marketing and sales  $1,247 16%  $681 13%
General and administrative  $579 8%  $384 7%
Total costs and expenses  $5,380 71%  $2,948 54%
Income from operations  $2,206 29%  $2,464 46%
Net income  $1,231 16%  $1,433 26%

Source: Facebook's second-quarter report. All dollar figures in millions.

As the bold line item signifies, the biggest reason for Facebook's net-income year-on-year drop was the huge ramp in research and development. On a year-on-year basis, Facebook increased its R&D costs 135%, much higher than the aforementioned 40% increase in revenue. The end result is R&D that climbed from 17% of total revenue in 2014's first half to 29% in 2015. That huge increase drove total costs and expenses higher and both income from ops and net income lower.

A question of effectiveness ...
It should be noted that a majority of this large R&D expense isn't cash per se, but actually share-based compensation expenses. Per Facebook's quarterly report, share-based compensation comprised $1.17 billion during the six months in 2015, or 52% of all R&D expenses. Of course, this is still an expense, as it expands shares outstanding. As such, investors should ask if Facebook's R&D spend is apropos.

And in terms of effectiveness, Facebook seems to be succeeding. In this period, the company grew its video views from 1 billion views a day to 4 billion and has significantly cut videos hosted by Alphabet's YouTube on its site in favor of its native video platform. In addition, new surveys show advertisers actually prefer advertising on Facebook over YouTube, a move that portends future ad-spend to be apportioned to the service going forward. For investors, Facebook's large R&D ramp-up should be welcomed, even if it means a short-term hit to the bottom line.