Ita Brennan
Analyst · the Arista website following this call.
I will now turn the call over to Mr. Chuck Elliott, Director of Investor Relations. Sir, you may begin
Thanks, Jayshree, and good afternoon. I'm pleased to announce the results for the second quarter of 2015, my first quarter with Arista. This analysis of our Q2 results and our guidance for Q3 '15 is based on non-GAAP and excludes all noncash stock-based compensation expenses and legal costs associated with the ongoing lawsuit. A reconciliation of our selected GAAP to non-GAAP results is provided in our earnings release.
Total GAAP revenues in Q2 were $195.6 million, up 42% year-over-year and comfortably above our guidance range of $183 million to $191 million. We experienced good momentum across all key verticals in the quarter, and we're pleased to see our service revenue continued as a model percentage of revenue.
International revenues totaled $45 million or 25% of total revenue. While we are focused on expanding our international footprint, you should expect our geographical revenue mix to fluctuate on a quarter-over-quarter basis depending on the timing of U.S. and international deployment.
Although not impacting our financials at this point, CloudVision has demonstrated some good early market acceptance in the short time since our product launch, and we expect to see good traction into 2016 and beyond.
Overall gross margin in Q2 was 65.8%, down slightly from Q1 at 66.1% and just above the upper end of our guidance range for the quarter. As a reminder, the biggest driver of volatility in our gross margin number is customer mix and to a lesser degree, product mix with large customers earning higher discount level. While our 4 verticals were well represented in our revenues for the quarter, we also experienced good traction with several of our cloud titan customers.
Operating expenses for the quarter came in at $74.7 million or 38% of revenue, up 33% from the prior year and 11% from the prior quarter. Our spending increases were largely focused on additional personnel in sales and marketing and R&D, higher prototype expenses and additional consulting costs as we complete our first year of SOX compliance. Our operating income for the quarter was $54 million or 27.6% of revenue.
Other expense for the quarter was $0.4 million, and our effective tax rate was 27.6%, resulting in net income for the quarter of $38.8 million or 19.8%. Our diluted share number for the quarter was $71.2 million, resulting in diluted earnings per share number of $0.54, up from $0.50 from the prior quarter and up over 50% from the prior year.
Legal expenses associated with the ongoing lawsuits came in at $9.9 million for the quarter, in line with our outlook on the last earnings call. As a reminder, these expenses are excluded from the non-GAAP results discussed above.
Now turning to the balance sheet. Cash, cash equivalents and investments ended the quarter at $552 million. We generated $52.6 million of cash from operations in the June quarter, up from $20.8 million in the prior period. DSOs came in at 57 days, flat to last quarter.
Inventory turns were 2.7x, down from 2.8x in Q1. At the end of Q2, we held approximately $100 million in inventory, including $28 million of raw materials. Our inventory planning strategy is to leverage inventory [indiscernible] where needed to ensure that we can flexibly respond to our customers' needs. That said, this will be an area of increased focus in coming quarters as we look to improve our inventory metrics.
Our deferred revenue balance was $164 million, up from $133 million in Q1. This balance is largely made of short and long-term service contracts with some product deferrals related to acceptance terms and future deliverables. Accounts payable days was 59 days, up from 43 days in Q1. Capital expenditures for the quarter were $3.6 million.
Now turning to our outlook for the third quarter and beyond. We are pleased with our financial performance in the first half of 2015 with revenues up 47%, and earnings per share up 75% on a year-over-year basis. We continue to increase our market share and gain traction across key verticals and customers.
The market remains competitive from a pricing perspective, and as mentioned above, our gross margins will fluctuate depending on our customer mix. We will continue to invest in the growth of the business, both in terms of increased headcount and the build-out of infrastructure as we expand our worldwide presence. We will do this in a judicious and powerful manner and within the parameters of our business model, which calls for operating expenses of approximately 40% of revenue.
With this as a backdrop, our guidance for the third quarter, which is based on non-GAAP results and excludes any noncash stock-based compensation expenses and any legal expenses associated with the ongoing lawsuits, is as follows: revenues of approximately $208 million to $212 million, gross margin of approximately 53% to 65% and operating income of approximately 25%. Our effective tax rate is expected to be 28% to 30%, with diluted shares of approximately 71.7 million.
Please note that based on our current understanding, we expect that the cost associated with the ongoing lawsuits to be approximately $15 million for this quarter, with this quarter representing a peak expenditure quarter as we engage directly in trial activities.
I'll now turn the call back to Chuck. Chuck?