| Computation of basic and diluted earnings (loss) per share |
The following table sets forth the computation of basic and diluted earnings per share for the periods indicated (in thousands, except per share data): | | | | | | | | | | | | | | | | | | | | Years Ended June 30, | | | 2019 | | 2018 | | 2017 | | Numerator: | | | | | | | Net Income | $ | 322,694 | | $ | 196,290 | | $ | 257,506 | | Denominator: | | | | | Weighted-average shares used in computing basic net income per share | 71,435 | | 77,179 | | 81,478 | | Add—dilutive potential common shares: | | | | | | | Stock options | 87 | | 1,074 | | 1,670 | | Restricted stock units | 80 | | 78 | | 104 | | Weighted-average shares used in computing diluted net income per share | 71,602 | | 78,331 | | 83,252 | | Net income per share of common stock: | | | | | Basic | $ | 4.52 | | $ | 2.54 | | $ | 3.16 | | Diluted | $ | 4.51 | | $ | 2.51 | | $ | 3.09 |
|