Condensed Consolidated Statements of Comprehensive Income - USD ($)
shares in Thousands, $ in Thousands
3 Months Ended
Apr. 30, 2018
Apr. 30, 2017
[1]
Revenues:    
Subscription services $ 156,003 $ 129,131
Professional services and other 39,544 30,641
Total revenues 195,547 159,772
Cost of revenues:    
Cost of subscription services [2] 29,913 26,138
Cost of professional services and other [2] 30,242 22,739
Total cost of revenues [2] 60,155 48,877
Gross profit 135,392 110,895
Operating expenses:    
Research and development [2] 37,197 28,311
Sales and marketing [2] 34,385 30,141
General and administrative [2] 19,854 13,580
Total operating expenses [2] 91,436 72,032
Operating income 43,956 38,863
Other income, net 2,139 591
Income before income taxes 46,095 39,454
Provision for income taxes 1,785 2,458
Net income 44,310 36,996
Net income attributable to Class A and Class B common stockholders, basic and diluted $ 44,310 $ 36,996
Net income per share attributable to Class A and Class B common stockholders:    
Basic $ 0.31 $ 0.27
Diluted $ 0.29 $ 0.24
Weighted-average shares used to compute net income per share attributable to Class A and Class B common stockholders:    
Basic 142,777 137,096
Diluted 154,935 151,056
Other comprehensive income:    
Net change in unrealized losses on available-for-sale investments $ 305 $ (106)
Net change in cumulative foreign currency translation gain (809) 905
Comprehensive income $ 43,806 $ 37,795
[1] See note 1 of the notes to the condensed consolidated financial statements for a summary of adjustments.
[2] Includes stock-based compensation as follows:  Cost of revenues: Cost of subscription services $345 $342 Cost of professional services and other 2,328 1,689 Research and development 4,667 3,802 Sales and marketing 4,088 3,847 General and administrative 5,583 2,108 Total stock-based compensation $17,011 $11,788