Overall gross profit margin on a GAAP and non-GAAP basis for the third quarter of 2017 was 36%. Overall gross profit margin on a GAAP and non-GAAP basis for the third quarter of 2016 was 30% and 31%, respectively.
Operating expenses for the third quarter of 2017 were $54.7 million, compared to $52.1 million for the third quarter of 2016. Non-GAAP operating expenses for the third quarter of 2017 were $43.9 million, compared to $49.3 million for the third quarter of 2016. GAAP operating expenses for the third quarter of 2017 included $7.7 million in restructuring charges associated with our recent workforce reduction.
As of September 30, 2017, cash, investments and restricted cash totaled $183 million. Working capital at the end of the third quarter was $337 million, compared to $342 million at the end of the second quarter.
"The third quarter was highlighted by several exciting customer wins and strategic developments", stated Peter Ungaro, president and CEO of Cray. "We completed our recently announced strategic transaction with Seagate to broaden our storage portfolio and deepen our presence in the storage market. In supercomputing, our CS500 cluster was selected by KISTI, a leading research institution in South Korea. And just last week we announced that we are partnering with Microsoft to deliver an integrated Cloud services offering which will allow customers unique access to our high-performance supercomputers in the Microsoft Azure Cloud - expanding our reach to new customers through the cloud and adding a complementary offering to our product set. While a slow-down in our primary target market has continued, I remain positive about our recent activity levels, win rates, and development efforts and I'm excited about our long-term prospects to drive growth."
A wide range of results remains possible for 2017. Several acceptances are planned for completion late in the fourth quarter, some of which will be challenging. Assuming Cray is able to complete these acceptances before year-end, Cray expects revenue for 2017 to be in the range of $400 million. GAAP and non-GAAP gross margins for the year are expected to be in the low- to mid-30% range. Non-GAAP operating expenses for 2017 are expected to be in the range of $180 million. For 2017, GAAP operating expenses are anticipated to be about $21 million higher than non-GAAP operating expenses, driven by share-based compensation, restructuring, and costs related to the Seagate transaction.
While a wide range of results remains possible and it is still early in the planning process, Cray expects 2018 annual revenue to grow in the range of 10% compared to Cray's current 2017 outlook. Revenue is expected to be about $75 million in the first quarter of 2018.
Actual results for any future periods are subject to large fluctuations given the nature of Cray's business.
Recent highlights include the following: