Table:
|  |  | Fiscal Year Ended |  |
| --- | --- | --- | --- |
| (In thousands, except per share amounts) | December 29, 2019 | December 30, 2018 | December 31, 2017 |
| Basic net income (loss) per share: |  |  |  |
| Numerator: |  |  |  |
| Net income (loss) attributable to stockholders | $22,159 | $(811,091) | $(929,121) |
| Denominator: |  |  |  |
| Basic weighted-average common shares | 144,796 | 140,825 | 139,370 |
| Basic net income (loss) per share | $0.15 | $(5.76) | $(6.67) |
| Diluted net income (loss) per share 1 |  |  |  |
| Numerator: |  |  |  |
| Net income (loss) attributable to stockholders | $22,159 | $(811,091) | $(929,121) |
| Net income (loss) available to common stockholders | $22,159 | $(811,091) | $(929,121) |
| Denominator: |  |  |  |
| Basic weighted-average common shares | 144,796 | 140,825 | 139,370 |
| Effect of dilutive securities: |  |  |  |
| Restricted stock units | 2,729 | - | - |
| Dilutive weighted-average common shares: | 147,525 | 140,825 | 139,370 |
| Dilutive net income (loss) per share | $ 0.15 | $ (5.76) | $ (6.67) |
Paragraphs:
Note 15. NET INCOME (LOSS) PER SHARE
We calculate basic net income (loss) per share by dividing earnings allocated to common stockholders by the basic weighted-average number of common shares outstanding for the period.
Diluted weighted-average shares is computed using basic weighted-average number of common shares outstanding plus any potentially dilutive securities outstanding during the period using the treasury-stock-type method and the if-converted method, except when their effect is anti-dilutive. Potentially dilutive securities include stock options, restricted stock units, and the outstanding senior convertible debentures.
The following table presents the calculation of basic and diluted net income (loss) per share attributable to stockholders:
1 As a result of our net loss attributable to stockholders for fiscal 2019, 2018, and 2017, the inclusion of all potentially dilutive stock options, restricted stock units, and common shares under noted warrants and convertible debt would be anti-dilutive. Therefore, those stock options, restricted stock units and shares were excluded from the computation of the weighted-average shares for diluted net loss per share for such periods.
Question:
How was the basic net income (loss) per share calculated?
Answer: By dividing earnings allocated to common stockholders by the basic weighted-average number of common shares outstanding for the period.