Stock-based compensation | Stockholders' equity Equity incentive plans The Company has outstanding equity grants from its three stock-based employee compensation plans: the 2014 Equity Incentive Plan (2014 Plan), the 2010 Equity Incentive Plan (2010 Plan), and the Employee Stock Purchase Plan (ESPP). No shares have been issued under the 2010 Plan since June 2014. The 2014 Plan provides for the granting of incentive and nonqualified stock options, restricted stock awards (RSAs), restricted stock units (RSUs), stock appreciation rights, stock bonus awards, and performance awards to employees, non-employee directors, and consultants. Options granted under the 2014 Plan generally expire within 10 years from the date of grant and generally vest over four years. Options with performance or market-based conditions are generally subject to a required service period along with the performance or market condition. RSUs granted under the 2014 Plan generally vest either annually or quarterly over three or four years based upon on continued service. The ESPP allows eligible employees to purchase shares of the Company's Class A common stock through payroll deductions at a price equal to 85% of the lower of the fair market values of the stock as of the beginning or the end of six-month offering periods. For additional information regarding the Company's equity incentive plans, please refer to the footnotes to the audited financial statements contained in its 2014 Annual Report. Stock option activity A summary of the Company’s stock option activity and related information is as follows: Options outstanding (shares in thousands) Shares Weighted- Weighted- Total intrinsic Aggregate Outstanding at December 31, 2014: 25,134 $ 6.62 $ 1,425,339 Granted 493 46.36 $ 22.54 Exercised (7,629 ) 1.98 $ 378,245 Forfeited/Cancelled (154 ) 17.10 Outstanding at June 30, 2015: 17,844 $ 9.62 $ 774,006 Exercisable at June 30, 2015 12,010 $ 3.55 $ 590,536 Vested and expected to vest at June 30, 2015 17,531 $ 9.36 $ 764,744 At June 30, 2015 , there was $61.9 million of unearned stock-based compensation expense related to unvested options, which is expected to be amortized over a weighted average period of 2.46 years . Restricted stock units The cost of RSUs is determined using the fair value of the Company's common stock on the date of grant, and compensation is recognized on a straight-line basis over the requisite service period. The Company also has issued RSUs with both a market condition and service condition. The Company estimated the fair value of these market-based RSUs using a Monte Carlo valuation model on the date of grant. A summary of the Company’s RSU activity is as follows: (shares in thousands) Shares Weighted- average grant date fair value Non-vested shares at December 31, 2014 4,307 $ 21.98 Granted 603 48.43 Vested (1,083 ) 15.84 Forfeited (27 ) 74.61 Non-vested shares at June 30, 2015 3,800 $ 27.55 In June 2014, the Company granted an award of 4.5 million RSUs to the Chief Executive Officer (CEO RSUs), which included 1.5 million RSUs that vested immediately upon grant and 3.0 million RSUs that were subject to a market-based condition and a service condition. In January 2015, the market-based condition was achieved and the Company recorded stock-based compensation expense of $6.0 million and $21.8 million during the three and six months ended June 30, 2015 . At June 30, 2015 , $14.5 million of total unearned compensation costs related to the CEO RSUs is expected to be recognized over the remaining vesting period of 2.0 years. At June 30, 2015 , there was $72.0 million of unearned stock-based compensation related to RSUs (including the CEO RSUs), which is expected to be amortized over a weighted average period of 2.27 years . Stock contributions In the second quarter of 2015, the CEO contributed an aggregate 4,858,180 shares of Class B common stock to the Company without consideration per the terms of a Contribution Agreement dated December 28, 2011, and amended on May 11, 2015. Under the original Contribution Agreement, the CEO agreed to contribute back to the Company from time to time the same number of shares of common stock as are issued to a certain Company employee upon the exercise of certain stock options held by such employee. Pursuant to this agreement, the CEO contributed back to the Company 180,000 shares of Class B common stock in April 2015. In May 2015, the CEO contributed back to the Company 4,678,180 shares of Class B common stock pursuant to the amended agreement, representing all of the then remaining shares subject to the contribution obligations. All of the shares contributed by the CEO were subsequently retired during the three months ended June 30, 2015. Employee stock purchase plan On February 13, 2015, a purchase under the Company's ESPP was made and employees purchased an aggregate of 313,233 shares at a price of $20.40 per share. During the three and six months ended June 30, 2015 , the Company recorded $0.9 million and $1.9 million of stock-based compensation expense related to the ESPP. At June 30, 2015 , there was $0.5 million of unearned stock-based compensation related to the Company’s ESPP, which is expected to be recognized over 0.12 years. Stock-based compensation expense The Company measures compensation expense for all stock-based payment awards, including stock options, RSUs, and purchases under the Company's ESPP, based on the estimated fair values on the date of the grant. The fair value of stock options granted and purchases under the Company's ESPP is estimated using the Black-Scholes option pricing model. There have been no significant changes in the Company’s valuation assumptions for measuring compensation expense from those disclosed in the footnotes to the audited financial statements contained in its 2014 Annual Report. The following table sets forth the detailed allocation of stock-based compensation expense: Three months ended Six months ended (in thousands) June 30, June 30, June 30, June 30, Stock-based compensation expense: Cost of revenue $ 350 $ 154 $ 633 $ 322 Research and development 3,710 1,657 7,245 3,058 Sales and marketing 2,932 1,654 5,998 3,068 General and administrative 11,197 30,728 30,814 31,782 Total stock-based compensation expense 18,189 34,193 44,690 38,230 Total tax benefit recognized (6,240 ) (11,483 ) (15,544 ) (11,825 ) Decrease in net income $ 11,949 $ 22,710 $ 29,146 $ 26,405 |