Net Income (Loss) Per Common Share
6 Months Ended
Jan. 31, 2015
Earnings Per Share [Abstract]  
Net Income (Loss) Per Common Share
Net Income (Loss) Per Common Share
Basic and diluted net income (loss) per common share is calculated by dividing net income (loss) by the weighted-average shares of common stock outstanding during the reporting period. The Company's dilutive potential common shares are not included when their effect is anti-dilutive.
Potentially dilutive common shares consist of common shares issuable upon exercise of stock options, issuances of Employee Stock Purchase Plan ("ESPP") shares, vesting of Restricted Stock Units ("RSUs"), and vesting of Market Stock Units ("MSUs"). The Company includes the common shares underlying MSUs in the calculation of diluted net income per share when they become contingently issuable and excludes such shares when they are not contingently issuable.
The dilutive effect of potentially dilutive common shares is calculated based on the average share price for each fiscal reporting period using the treasury stock method. Under the treasury stock method, the amount the employee must pay for exercising stock options, the amount of compensation cost for future service that the Company has not yet recognized, and the amount of tax benefits that would be recorded in additional paid-in capital when the award becomes deductible are collectively assumed to be used to repurchase shares.
The following table sets forth the computation of basic and diluted net income (loss) per share:
 
Three Months Ended January 31,
 
Six Months Ended January 31,
 
2015
 
2014
 
2015
 
2014
 
(in thousands, except per share data)
Net income (loss)
$
5,683

 
$
(10,701
)
 
$
8,426

 
$
(18,528
)
Weighted-average shares outstanding - basic
107,891

 
107,153

 
108,132

 
109,608

Dilutive effect of potential shares
5,502

 

 
6,579

 

Weighted-average shares outstanding - diluted
113,393

 
107,153

 
114,711

 
109,608

Net income (loss) per share - basic
$
0.05

 
$
(0.10
)
 
$
0.08

 
$
(0.17
)
Net income (loss) per share - diluted
$
0.05

 
$
(0.10
)
 
$
0.07

 
$
(0.17
)


The following table summarizes the potentially dilutive common shares that were excluded from the computation of the diluted net income (loss) per share for the periods presented, because including them would have had an anti-dilutive effect:
 
Three Months Ended January 31,
 
Six Months Ended January 31,
 
2015
 
2014
 
2015
 
2014
 
(in thousands)
Options to purchase common stock
1,013

 
1,102

 
1,023

 
1,201

Restricted stock awards
1,833

 
1,345

 
1,357

 
1,295

Market stock units
580

 

 
429