Entity information:
Income taxes
The domestic and foreign components of loss before provision (benefit) for income taxes were as follows (in thousands):
 
 
Fiscal Year Ended June 30,
 
 
2017
 
2016
 
2015
United States
 
$
(49,295
)
 
$
(36,142
)
 
$
(37,583
)
Foreign
 
2,874

 
1,332

 
1,514

Loss before provision (benefit) for income taxes
 
$
(46,421
)
 
$
(34,810
)
 
$
(36,069
)

 
The provision (benefit) for income taxes consists of the following (in thousands):
 
 
Fiscal Year Ended June 30,
 
 
2017
 
2016
 
2015
Current income taxes:
 
 
 
 
 
 
Federal
 
$
(435
)
 
$
70

 
$
(10,214
)
State
 
(1,075
)
 
5

 
(3,674
)
Foreign
 
2,131

 
261

 
219

Total current income taxes
 
621

 
336

 
(13,669
)
Deferred income taxes:
 
 
 
 
 
 
Federal
 

 

 
1,334

State
 

 

 

Foreign
 
220

 
175

 
(671
)
Total deferred income taxes
 
220

 
175

 
663

Total provision (benefit) for income taxes
 
$
841

 
$
511

 
$
(13,006
)

The provision (benefit) for income taxes differs from the amount computed by applying the statutory federal income tax rate as follows (in thousands):
 
 
Fiscal Year Ended June 30,
 
 
2017
 
2016
 
2015
Tax at federal statutory tax rate
 
$
(16,248
)
 
$
(12,184
)
 
$
(12,624
)
State taxes—net of federal benefit
 
(1,075
)
 
8

 
(893
)
Non-deductible expenses
 
108

 
129

 
68

Research and development credits
 

 

 
(2,678
)
Section 199 deduction
 

 

 
(907
)
Foreign withholding taxes
 
1,737

 

 

Foreign income taxed at different rates
 
(323
)
 
(2
)
 
(276
)
Stock-based compensation expense
 
364

 
562

 
1,011

Tax exempt income
 
(24
)
 
(302
)
 
(844
)
Change in valuation allowance
 
16,807

 
12,270

 
6,138

Change in tax accounting method
 

 

 
(1,121
)
FIN 48
 
(479
)
 
52

 
(827
)
Other
 
(26
)
 
(22
)
 
(53
)
Total provision (benefit) for income taxes
 
$
841

 
$
511

 
$
(13,006
)

Our provision for income taxes was $841,000 in fiscal 2017 compared to $511,000 in fiscal 2016. Our effective tax rate was 2% in fiscal 2017 compared to an effective tax rate of 1% in fiscal 2016. Our effective tax rate in fiscal 2017 was attributable primarily to foreign withholding taxes and income taxes in certain foreign jurisdictions where we have profit, partially offset by the reversal of tax reserves related to the settlement of our New York state and IRS tax audits. Our effective tax rate in fiscal 2016 was attributable primarily to income taxes in certain foreign jurisdictions where we have profit. Our benefit for income taxes was $(13.0) million in fiscal 2015. Our effective tax rate in fiscal 2015 was attributable primarily to tax benefits recorded from the anticipated federal income tax refund of $5.4 million; the recognition of a state income tax refund of $3.0 million and a refund of $1.1 million from a change in tax accounting method, both related to prior years and received in fiscal 2015; and the reversal of tax reserves of $4.2 million due to loss carryback, expiration of the statute of limitations, and settlement of our California audit.
Our effective tax rate of 2% and 1% in fiscal 2017 and 2016, respectively, was lower than the tax computed at the U.S. federal statutory income tax rate due primarily to losses for which no benefit will be recognized since they are not more likely than not to be realized due to the lack of current and future income and the inability to carry back losses within the two year carryback period.
In July 2016, the state of New York completed its audit of our income taxes for fiscal 2010 through fiscal 2012. We paid $442,000 to settle the audit and recorded a tax benefit of approximately $1.0 million in July 2016 to reverse the related tax reserves.
In May 2017, the Internal Revenue Service, or IRS, completed its audit of our income taxes for fiscal 2012 through fiscal 2015. The audit resulted in a $947,000 reduction of our research and development tax credit carryforwards and we recorded a tax benefit of $425,000 to reverse the related tax reserves.
Due to the limitations of the two year loss carryback for federal tax purposes, we do not anticipate any refunds for losses incurred in fiscal 2017 or thereafter.
Deferred income taxes reflect the net tax effects of temporary differences between the carrying amounts of assets and liabilities for financial reporting purposes and the amounts used for income tax purposes. Significant components of our net deferred tax assets were as follows (in thousands):
 
 
June 30,
 
 
2017
 
2016
Deferred tax assets:
 
 
 
 
Federal, state and foreign net operating losses
 
$
42,702

 
$
16,482

Federal and state tax credits
 
9,897

 
6,696

Stock-based compensation
 
5,044

 
4,747

Accrued expenses and reserves
 
11,664

 
5,465

Capitalized expense
 
174

 
252

Unrealized losses on investments
 
717

 
727

Acquired intangible assets
 
822

 
596

Total deferred tax assets:
 
71,020

 
34,965

Deferred tax liabilities:
 
 
 
 
Property and equipment
 
(329
)
 
(468
)
Capitalized software
 
(19,528
)
 
(3,734
)
Unrealized gains on investments
 
(630
)
 
(353
)
Total deferred tax liabilities:
 
(20,487
)
 
(4,555
)
Deferred tax assets, net of liabilities:
 
50,533

 
30,410

Valuation allowance - worldwide
 
(50,083
)

(29,820
)
Net deferred tax assets:
 
$
450

 
$
590


All available evidence, both positive and negative, was considered to determine whether, based upon the weight of the evidence, a valuation allowance for deferred tax assets is needed.
Due to operating losses in previous years and continued earnings volatility, we maintain a valuation allowance on the majority of our deferred tax assets, net of liabilities, since the assets are not more likely than not to be realized based upon our assessment of all positive and negative evidence. Realization of deferred tax assets is dependent upon future taxable earnings and losses, the timing of which is uncertain. Due to losses in previous years, and expected losses in fiscal 2018 and potentially future years in the U.S., we maintained a full valuation allowance on deferred tax assets in the U.S. Due to operating losses in previous years and expected losses in future years, we continued to maintain a full valuation allowance for our foreign deferred tax assets in the United Kingdom. Our valuation allowance increased from the prior year by approximately $20.3 million, $12.1 million, and $4.7 million in fiscal 2017, 2016 and 2015, respectively.
We provide for U.S. income taxes on the earnings of foreign subsidiaries unless the subsidiaries' earnings are permanently reinvested outside the U.S. To the extent that the foreign earnings previously treated as permanently reinvested are repatriated, the related U.S. liability may be reduced by any foreign income taxes paid on these earnings. As of June 30, 2017, the cumulative amount of earnings upon which U.S. income taxes have not been provided was approximately $3.6 million. The net unrecognized deferred tax liability for these earnings was zero since we have significant net operating losses which are available to offset the repatriation income.
As of June 30, 2017, we had federal and California net operating loss carryforwards for income tax purposes of $112.5 million and $9.3 million, respectively. These loss carryforwards will begin to expire in fiscal 2020 for federal purposes and fiscal 2017 for California purposes. In addition, we had federal and California research and development tax credit carryforwards of $4.6 million and $8.1 million, respectively, as of June 30, 2017. The federal research credits will begin to expire in fiscal 2023 and the California research credits can be carried forward indefinitely. The loss carryforwards and certain credits are subject to annual limitation under Internal Revenue Code Section 382.
As of June 30, 2017, we also had foreign net operating loss carryforwards of $5.0 million, which can be carried forward indefinitely. Due to uncertainty regarding our ability to utilize the foreign net operating loss carryforwards in certain jurisdictions, we have placed a valuation allowance of $0.5 million on these deferred tax assets.
The following is a tabular reconciliation of the total amounts of unrecognized tax benefits (in thousands):
 
 
Fiscal Year Ended June 30,
 
 
2017
 
2016
 
2015
Unrecognized tax benefit—beginning of period
 
$
6,662

 
$
6,114

 
$
6,931

Increase in tax positions taken during the current period
 
678

 
513

 
562

Increase in tax positions taken during the prior period
 
242

 
74

 
170

Decrease in tax positions due to settlements
 
(4,086
)
 

 
(600
)
Lapse of statute of limitations
 
(461
)
 
(39
)
 
(949
)
Unrecognized tax benefit—end of period
 
$
3,035

 
$
6,662

 
$
6,114


At June 30, 2017, 2016 and 2015, there were $0.1 million, $1.6 million and $1.7 million of unrecognized tax benefits that if recognized would affect the annual effective tax rate.
We file income tax returns in the U.S. with the IRS, California, various states, and foreign tax jurisdictions in which we have subsidiaries. The statute of limitations remains open for fiscal 2016 for federal tax purposes, for fiscal 2013 through fiscal 2016 in state jurisdictions, and for fiscal 2012 through 2016 in foreign jurisdictions. Fiscal years outside the normal statute of limitation remain open to audit by tax authorities due to tax attributes generated in those early years which have been carried forward and may be audited in subsequent years when utilized. As of June 30, 2017, we were under audit by the state of New York for fiscal 2013 through fiscal 2015 and the statute of limitations has been extended for fiscal 2013 to allow New York additional time to complete its audit.
We believe it is reasonably possible that the gross unrecognized tax benefits as of June 30, 2017 could decrease (whether by payment, release, or a combination of both) by approximately $0.1 million in the next 12 months. We recognize interest and penalties related to unrecognized tax positions as part of our provision for federal, state and foreign income taxes. During fiscal 2017, 2016 and 2015, we recognized approximately $17,000, $91,000 and $134,000 in interest and penalties. We had accrued $91,000 and $570,000 for the payment of interest and penalties at June 30, 2017 and 2016, respectively.