Earnings (Loss) Per Share Attributable to Common Stockholders | 9. Earnings (Loss) Per Share Attributable to Common Stockholders Basic and diluted net income (loss) per share attributable to common stockholders is presented in conformity with the two-class method required for participating securities. We consider convertible preferred stock and early exercised share options to be participating securities. Undistributed earnings allocated to participating securities are subtracted from net income (loss) in determining net income (loss) attributable to common stockholders. Basic net income (loss) per share attributable to common stockholders is computed by dividing the net income (loss) attributable to common stockholders by the weighted-average number of common shares outstanding during the period. All participating securities are excluded from basic weighted-average common shares outstanding. For the calculation of diluted earnings per share (“EPS”), net income (loss) attributable to common stockholders for basic EPS is adjusted by the effect of dilutive securities. Diluted net income (loss) per share attributable to common stockholders is computed by dividing the net income (loss) attributable to common stockholders by the weighted-average number of common shares outstanding, including all potentially dilutive common shares. The undistributed earnings are allocated based on the contractual participation rights of the Class A and Class B common shares as if the earnings for the year have been distributed. As the liquidation and dividend rights are identical, the undistributed earnings are allocated on a proportionate basis. The computation of the diluted net income (loss) per share of Class A common stock assumes the conversion of Class B common stock, while diluted net income (loss) per share of Class B common stock does not assume the conversion of Class A common stock as Class A common stock is not convertible into Class B common stock. A reconciliation of the numerator and denominator used in the calculation of the basic and diluted EPS attributable to common stockholders is as follows (in thousands except share and per share amounts): For the Three Months Ended For the Nine Months Ended April 28, 2018 April 29, 2017 April 28, 2018 April 29, 2017 Class A Class B Class B Class A Class B Class B Numerator: Net income (loss) $ 1,496 $ 7,991 $ (9,563 ) $ 2,895 $ 23,721 $ 3,913 Less: noncumulative dividends to preferred stockholders — — — (83 ) (685 ) (1,905 ) Less: undistributed earnings to participating securities (5 ) (24 ) — (738 ) (6,045 ) (1,428 ) Net income (loss) attributable to common stockholders - basic 1,491 7,967 (9,563 ) 2,074 16,991 580 Less: change in fair value of preferred stock warrant liability (net of tax) — — — (10,685 ) (10,685 ) — Add: adjustments to undistributed earnings to participating securities 1 1 — 3,033 2,703 68 Reallocation of undistributed earnings as a result of conversion of Class B to Class A shares 7,967 — — 16,991 — — Reallocation of undistributed earnings to Class B shares — 62 — — 1,258 — Net income (loss) attributable to common stockholders - diluted $ 9,459 $ 8,030 $ (9,563 ) $ 11,413 $ 10,267 $ 648 Denominator: Weighted-average shares of common stock - basic 15,304,926 81,750,647 25,094,602 7,460,177 61,136,801 24,729,238 Conversion of Class B to Class A common shares outstanding 81,750,647 — — 61,136,801 — — Effect of dilutive stock options and restricted stock units 4,791,948 4,712,239 — 5,258,943 5,258,943 4,259,096 Effect of potentially dilutive preferred stock warrants — — — 425,290 425,290 — Weighted-average shares of common stock - diluted 101,847,521 86,462,886 25,094,602 74,281,211 66,821,034 28,988,334 Earnings (loss) per share attributable to common stockholders: Basic $ 0.10 $ 0.10 $ (0.38 ) $ 0.28 $ 0.28 $ 0.02 Diluted $ 0.09 $ 0.09 $ (0.38 ) $ 0.15 $ 0.15 $ 0.02 The following common stock equivalents were excluded from the computation of diluted earnings (loss) per share for the periods presented because including them would have been antidilutive: For the Three Months Ended For the Nine Months Ended April 28, 2018 April 29, 2017 April 28, 2018 April 29, 2017 Convertible preferred stock — 59,511,055 — 59,511,055 Preferred stock warrants — 1,066,225 — 1,066,225 Restricted stock units 1,055,524 — 1,946,192 — Stock options to purchase Class A common stock 558,372 982,958 Stock options to purchase Class B common stock 3,951,636 282,145 4,266,341 660,749 Total 5,565,532 60,859,425 7,195,491 61,238,029 |